22 lines
592 B
Python
22 lines
592 B
Python
from marshmallow import Schema, fields
|
|
|
|
|
|
class WorkspaceSchema(Schema):
|
|
id = fields.Integer(dump_only=True)
|
|
user_id = fields.Integer()
|
|
name = fields.String(required=True)
|
|
description = fields.String(allow_none=True)
|
|
is_default = fields.Boolean()
|
|
created_at = fields.DateTime(dump_only=True)
|
|
updated_at = fields.DateTime(dump_only=True)
|
|
|
|
|
|
class WorkspaceCreateSchema(Schema):
|
|
name = fields.String(required=True)
|
|
description = fields.String(allow_none=True)
|
|
|
|
|
|
class WorkspaceUpdateSchema(Schema):
|
|
name = fields.String()
|
|
description = fields.String()
|