"""Product rejection Activity schema.""" from marshmallow import Schema, fields class RejectionReason(Schema): """Schema for each rejection. Properties: - title (str): Reject field name or "general comment". - comments (str): actual comment entered by user """ title = fields.String(required=True) comments = fields.String(required=True) class ProductRejection(Schema): """Schema for product rejection. Properties: - product_id (int): Product Id - rejection_reasons (list): List of reasons """ product_id = fields.Integer(required=True) rejection_reasons = fields.Nested(RejectionReason, many=True, required=True)