2022-10-27 11:19:38 +02:00
|
|
|
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()
|
2022-10-27 12:05:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
class ExaminationScheduleSchema(Schema):
|
|
|
|
id = fields.Integer()
|
|
|
|
title = fields.Str()
|
|
|
|
|
|
|
|
|
|
|
|
class ExaminationScheduleListSchema(Schema):
|
|
|
|
examination_schedules = fields.List(fields.Nested(ExaminationScheduleSchema))
|