from marshmallow import Schema, fields class ConversationSchema(Schema): id = fields.Integer(dump_only=True) workspace_id = fields.Integer() agent_id = fields.Integer() title = fields.String(allow_none=True) channel = fields.String() channel_user_id = fields.String(allow_none=True) status = fields.String() created_at = fields.DateTime(dump_only=True) updated_at = fields.DateTime(dump_only=True) class ConversationCreateSchema(Schema): agent_id = fields.Integer(required=True) title = fields.String(allow_none=True) class ConversationUpdateSchema(Schema): title = fields.String() status = fields.String()