text: from rest_framework import serializers
  from django.contrib.auth.models import Permission, Group
  from django.contrib.contenttypes.models import ContentType
  from app_api.models import EmailVerifyRecord, OrderStatus, Order, OrderItem, CouponRange, CouponStatus, Coupon, IntegralType, Integral, Notice, LessonScript, Lesson, Question, Cart, Consult, User, Bill, Address, Catalog, LogType, Log, ReadType, ReadChapter, ReadChapterItem, Teacher, Comment, Hot, RechargeAction, RechargePay, Recharge, LabelFollow, Student, StudentType, Navigation, Read, Article, History, QaType, Answer, Qa, ArticleType, UserNotice, Slider, UserLesson, Nav, LabelType, LessonType, LessonHardType, Label, Footer, CommonPathConfig, Chapter, Term, SysLog
  
  
  class ContentTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ContentType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ContentTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ContentType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class EmailVerifyRecordListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = EmailVerifyRecord
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class EmailVerifyRecordCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = EmailVerifyRecord
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class OrderStatusListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = OrderStatus
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class OrderStatusCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = OrderStatus
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CouponRangeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = CouponRange
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CouponRangeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = CouponRange
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CouponStatusListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = CouponStatus
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CouponStatusCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = CouponStatus
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class IntegralTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = IntegralType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class IntegralTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = IntegralType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class NoticeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Notice
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class NoticeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Notice
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonScriptListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LessonScript
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonScriptCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LessonScript
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CartListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Cart
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CartCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Cart
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ConsultListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Consult
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ConsultCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Consult
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class AddressListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Address
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class AddressCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Address
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CatalogListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Catalog
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CatalogCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Catalog
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LogTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LogType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LogTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LogType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ReadType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ReadType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class TeacherListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Teacher
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class TeacherCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Teacher
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CommentListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Comment
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CommentCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Comment
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class HotListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Hot
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class HotCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Hot
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class RechargeActionListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = RechargeAction
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class RechargeActionCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = RechargeAction
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class RechargePayListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = RechargePay
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class RechargePayCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = RechargePay
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LabelFollowListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LabelFollow
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LabelFollowCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LabelFollow
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class StudentTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = StudentType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class StudentTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = StudentType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class NavigationListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Navigation
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class NavigationCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Navigation
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class HistoryListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = History
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class HistoryCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = History
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class QaTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = QaType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class QaTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = QaType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class AnswerListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Answer
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class AnswerCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Answer
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ArticleTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ArticleType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ArticleTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ArticleType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class SliderListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Slider
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class SliderCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Slider
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class NavListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Nav
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class NavCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Nav
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LabelTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LabelType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LabelTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LabelType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LessonType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LessonType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonHardTypeListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LessonHardType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonHardTypeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = LessonHardType
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class FooterListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Footer
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class FooterCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Footer
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CommonPathConfigListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = CommonPathConfig
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CommonPathConfigCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = CommonPathConfig
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class SysLogListSerializer(serializers.ModelSerializer):
      
  
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = SysLog
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class SysLogCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = SysLog
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class PermissionListSerializer(serializers.ModelSerializer):
      
  
      class ContentTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = ContentType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      content_type = ContentTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Permission
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class PermissionCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Permission
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class GroupListSerializer(serializers.ModelSerializer):
      
  
      class PermissionSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Permission
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      permissions = PermissionSerializer(many=True)
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Group
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class GroupCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Group
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class OrderListSerializer(serializers.ModelSerializer):
      
  
      class OrderStatusSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = OrderStatus
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      status = OrderStatusSerializer()
      class RechargePaySerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = RechargePay
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      way = RechargePaySerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Order
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class OrderCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Order
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class OrderItemListSerializer(serializers.ModelSerializer):
      
  
      class OrderSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Order
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      order = OrderSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = OrderItem
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class OrderItemCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = OrderItem
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CouponListSerializer(serializers.ModelSerializer):
      
  
      class CouponRangeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = CouponRange
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      range = CouponRangeSerializer()
      class CouponStatusSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = CouponStatus
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      status = CouponStatusSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Coupon
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class CouponCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Coupon
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class IntegralListSerializer(serializers.ModelSerializer):
      
  
      class IntegralTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = IntegralType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = IntegralTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Integral
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class IntegralCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Integral
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonListSerializer(serializers.ModelSerializer):
      
  
      class LabelTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LabelType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      category = LabelTypeSerializer()
      class LessonTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LessonType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = LessonTypeSerializer()
      class LessonHardTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LessonHardType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      hard = LessonHardTypeSerializer()
      class TeacherSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Teacher
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      teacher = TeacherSerializer()
      class LessonScriptSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LessonScript
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      script = LessonScriptSerializer()
      class LabelSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Label
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      labels = LabelSerializer(many=True)
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Lesson
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LessonCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Lesson
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class QuestionListSerializer(serializers.ModelSerializer):
      
  
      class LabelSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Label
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      tags = LabelSerializer(many=True)
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Question
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class QuestionCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Question
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class UserListSerializer(serializers.ModelSerializer):
      
  
      class GroupSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Group
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      groups = GroupSerializer(many=True)
      class PermissionSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Permission
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      user_permissions = PermissionSerializer(many=True)
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = User
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class UserCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = User
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class BillListSerializer(serializers.ModelSerializer):
      
  
      class RechargePaySerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = RechargePay
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      way = RechargePaySerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Bill
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class BillCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Bill
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LogListSerializer(serializers.ModelSerializer):
      
  
      class LogTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LogType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = LogTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Log
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LogCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Log
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadChapterListSerializer(serializers.ModelSerializer):
      
  
      class ReadSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Read
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      read = ReadSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ReadChapter
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadChapterCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ReadChapter
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadChapterItemListSerializer(serializers.ModelSerializer):
      
  
      class ReadChapterSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = ReadChapter
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      read_chapter = ReadChapterSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ReadChapterItem
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadChapterItemCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = ReadChapterItem
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class RechargeListSerializer(serializers.ModelSerializer):
      
  
      class RechargeActionSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = RechargeAction
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      action = RechargeActionSerializer()
      class RechargePaySerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = RechargePay
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      way = RechargePaySerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Recharge
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class RechargeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Recharge
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class StudentListSerializer(serializers.ModelSerializer):
      
  
      class StudentTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = StudentType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = StudentTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Student
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class StudentCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Student
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadListSerializer(serializers.ModelSerializer):
      
  
      class TeacherSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Teacher
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      author = TeacherSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Read
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ReadCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Read
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ArticleListSerializer(serializers.ModelSerializer):
      
  
      class ArticleTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = ArticleType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = ArticleTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Article
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ArticleCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Article
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class QaListSerializer(serializers.ModelSerializer):
      
  
      class QaTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = QaType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = QaTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Qa
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class QaCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Qa
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class UserNoticeListSerializer(serializers.ModelSerializer):
      
  
      class NoticeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Notice
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      messageid = NoticeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = UserNotice
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class UserNoticeCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = UserNotice
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class UserLessonListSerializer(serializers.ModelSerializer):
      
  
      class LessonTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LessonType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = LessonTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = UserLesson
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class UserLessonCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = UserLesson
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LabelListSerializer(serializers.ModelSerializer):
      
  
      class LabelTypeSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = LabelType
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      type = LabelTypeSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Label
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class LabelCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Label
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ChapterListSerializer(serializers.ModelSerializer):
      
  
      class LessonSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Lesson
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      lesson = LessonSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Chapter
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class ChapterCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Chapter
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class TermListSerializer(serializers.ModelSerializer):
      
  
      class ChapterSerializer(serializers.ModelSerializer):
          ty_options_display_txt = serializers.SerializerMethodField()
          class Meta:
              model = Chapter
              fields = "__all__"
          @staticmethod
          def get_ty_options_display_txt(obj):
              return str(obj)
      chapter = ChapterSerializer()
      key = serializers.CharField(source="pk")
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Term
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  
  
  class TermCreateUpdateSerializer(serializers.ModelSerializer):
      
      ty_options_display_txt = serializers.SerializerMethodField()
  
      class Meta:
          model = Term
          fields = "__all__"
  
      @staticmethod
      def get_ty_options_display_txt(obj):
          return str(obj)
  