"""Schema for WorksheetAdjustmentDetail serialization.""" from abacus_common_logic.marshalling.custom_fields import ma class WorksheetAdjustmentDetailSchema(ma.Schema): """WorksheetAdjustmentDetail schema.""" worksheet_adjustment_detail_id = ma.NonNegativeInteger(required=True) worksheet_adjustment_id = ma.NonNegativeInteger(required=True) statement_period_adjustment_file_id = ma.NonNegativeInteger(required=True) account_id = ma.NonNegativeInteger(required=True) contract_id = ma.NonNegativeInteger(allow_none=True) apply_to_flowthrough_payment = ma.Boolean(allow_none=True) activity_statement_period_id = ma.NonNegativeInteger(required=True) apply_to_statement_period_id = ma.NonNegativeInteger(required=True) reference_adjustment_type_id = ma.NonNegativeInteger(required=True) currency_code = ma.NonemptyString(required=True) amount = ma.Decimal(as_string=True, required=True) upc = ma.NonemptyString(required=True) distribution_type = ma.NonemptyString(required=True) note = ma.NonemptyString(allow_none=True) internal_note = ma.NonemptyString(allow_none=True)