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): id = fields.Integer() 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() class ExaminationScheduleSchema(Schema): id = fields.Integer() title = fields.Str() class ExaminationScheduleListSchema(Schema): examination_schedules = fields.List(fields.Nested(ExaminationScheduleSchema))