"""Historical Contract Advance marshmallow schemas.""" from abacus_common_logic.marshalling.custom_fields import ma class HistoricalContractAdvanceSchema(ma.Schema): """Historical Contract Advance details.""" id = ma.IntegerId(required=True) oa_advance_id = ma.IntegerId(required=True) oa_contract_id = ma.IntegerId(required=True) account_id = ma.IntegerId(required=True) amount = ma.Float(required=True) currency_id = ma.NonNegativeInteger(required=True) currency = ma.NonemptyString(required=True) due_type = ma.NonemptyString(required=True) date_paid = ma.FormattedDate(allow_none=True) exchange_rate = ma.Float(allow_none=True) description = ma.NonemptyString(allow_none=True) apply_to_period_id = ma.NonNegativeInteger(allow_none=True)