12 lines
386 B
Python
12 lines
386 B
Python
from marshmallow import Schema, fields
|
|
|
|
from ..validators import validate_datetime_greater_than_now
|
|
|
|
|
|
class EnrollmentCreateSchema(Schema):
|
|
start_date = fields.DateTime(validate=validate_datetime_greater_than_now, required=True)
|
|
end_date = fields.DateTime(validate=validate_datetime_greater_than_now, required=True)
|
|
|
|
class Meta:
|
|
datetimeformat = '%Y-%m-%d %H:%M:%S'
|