from rest_framework import serializers

from .models import *

from apps.system.serializers import DictSerializer, UserListSerializer
from apps.certset.serializers import StandardSerializer

class ContactRecordSerializer(serializers.ModelSerializer):
    create_by_=UserListSerializer(source='create_by', read_only=True)
    class Meta:
        model = ContactRecord
        fields = '__all__'

class PlanSerializer(serializers.ModelSerializer):
    class Meta:
        model = Plan
        fields = '__all__'

class MemberSerializer(serializers.ModelSerializer):
    user_ = UserListSerializer(source='user', read_only=True)
    identity_ = DictSerializer(source='identity', read_only=True)
    class Meta:
        model = Member
        fields = '__all__'