package api // AdultsMonthData is the reconciled ledger for one adult member in one month. // Keys match Python's result["members"][name]["months"][YYYY-MM]. type AdultsMonthData struct { Expected int `json:"expected"` OriginalExpected int `json:"original_expected"` AttendanceCount int `json:"attendance_count"` Exception *ExceptionData `json:"exception"` Paid float64 `json:"paid"` // float: proportional allocator may produce fractional CZK Transactions []MemberTxEntry `json:"transactions"` } // AdultsMemberData is the reconciled ledger for one adult member. // Keys match Python's result["members"][name]. type AdultsMemberData struct { Tier string `json:"tier"` Months map[string]AdultsMonthData `json:"months"` // YYYY-MM → month data OtherTransactions []MemberOtherEntry `json:"other_transactions"` TotalBalance int `json:"total_balance"` } // AdultsResponse is the JSON contract for GET /api/adults. // MemberData, MonthLabels, and RawPayments correspond to the Python view-model // fields member_data, month_labels_json, and raw_payments_json respectively, // but as nested objects rather than pre-serialised JSON strings. type AdultsResponse struct { Months []string `json:"months"` // display labels RawMonths []string `json:"raw_months"` // "YYYY-MM" Results []MemberRow `json:"results"` Totals []TotalCell `json:"totals"` MemberData map[string]AdultsMemberData `json:"member_data"` // name → ledger MonthLabels map[string]string `json:"month_labels"` // YYYY-MM → display label RawPayments map[string][]RawTransaction `json:"raw_payments"` // name → raw sheet rows Credits []Credit `json:"credits"` Debts []Credit `json:"debts"` Unmatched []RawTransaction `json:"unmatched"` AttendanceURL string `json:"attendance_url"` PaymentsURL string `json:"payments_url"` BankAccount string `json:"bank_account"` CurrentMonth string `json:"current_month"` }