"""Schema for streams-by-product endpoint.""" from marshmallow import fields from sound_recordings.schemas.common import BaseSchema, StreamBreakdownItemSchema class StreamsProductSchema(BaseSchema): """Schema for streams by product timeseries.""" product_id = fields.String() items = fields.Nested(StreamBreakdownItemSchema, many=True) class StreamsByProductSchema(BaseSchema): """Schema for Streams by Product.""" isrc = fields.String() products = fields.Nested(StreamsProductSchema, many=True)