system-pri/backend/app/examination_schedule/schemas.py

32 lines
728 B
Python

from marshmallow import fields, validate, Schema
class ProjectSupervisorSchema(Schema):
first_name = fields.Str()
last_name = fields.Str()
class CommitteeSchema(Schema):
members = fields.List(fields.Nested(ProjectSupervisorSchema))
class GroupSchema(Schema):
name = fields.Str()
class EnrollmentSchema(Schema):
start_date = fields.DateTime()
end_date = fields.DateTime()
committee = fields.Nested(CommitteeSchema)
group = fields.Nested(GroupSchema)
class EnrollmentPaginationSchema(Schema):
enrollments = fields.List(fields.Nested(EnrollmentSchema))
max_pages = fields.Integer()
class EnrollmentQuerySchema(Schema):
page = fields.Integer()
per_page = fields.Integer()