"""
系统模块序列化器
"""
from rest_framework import serializers
from .models import Feedback, AppVersion


class FeedbackSerializer(serializers.ModelSerializer):
    """反馈序列化器"""

    class Meta:
        model = Feedback
        fields = ['id', 'content', 'contact', 'created_at']
        read_only_fields = ['id', 'created_at']


class AppVersionSerializer(serializers.ModelSerializer):
    """App版本序列化器"""

    class Meta:
        model = AppVersion
        fields = ['id', 'platform', 'version', 'force_update',
                  'update_url', 'release_notes', 'created_at']
