You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
428 B
13 lines
428 B
from rest_framework import serializers
|
|
from ..models import StuBatch
|
|
|
|
|
|
class BatchSerializer(serializers.ModelSerializer):
|
|
"""
|
|
批次管理序列化
|
|
"""
|
|
|
|
class Meta:
|
|
model = StuBatch
|
|
fields = ("id", "name", "desc", "create_username", "update_username", "create_time", "year", "user_id")
|
|
extra_kwargs = {"name": {"required": True, "error_messages": {"required": "必须填写批次名"}}}
|
|
|