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

from django.contrib.auth.models import Group, User
from rest_framework import serializers

from account.models import LensmanInfo, UserInfo


class UserSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = User
        fields = ('url', 'username', 'email', 'groups')


class GroupSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Group
        fields = ('url', 'name')


class LensmanInfoSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = LensmanInfo
        fields = ('lensman_id', 'name', 'sex', 'phone', 'location', 'proportion', 'created_at')


class UserInfoSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = UserInfo
        fields = ('user_id', 'name', 'sex', 'phone', 'location', 'user_status', 'created_at')
