# -*- coding: utf-8 -*-

from rest_framework import serializers

from group.models import GroupInfo, GroupPhotoInfo, GroupUserInfo


class GroupInfoSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = GroupInfo
        fields = ('group_id', 'admin_id', 'group_name', 'group_desc', 'group_from', 'group_lock', 'status', 'created_at', 'updated_at')


class GroupUserInfoSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = GroupUserInfo
        fields = ('group_id', 'user_id', 'current_id', 'nickname', 'admin', 'user_status', 'passed_at', 'refused_at', 'status', 'created_at', 'updated_at')


class GroupPhotoInfoSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = GroupPhotoInfo
        fields = ('group_id', 'user_id', 'nickname', 'photo_path', 'photo_thumbnail_path', 'status', 'created_at', 'updated_at')
