analytics: customers totals, open counts, normalize education/marriage
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guwandykandClaude Opus 5.5 committed 2026-10-02 11:06:18 +05:00
1 parent 29867561d1
commit 965b00dba5
2 files changed
+31 -7

No files matched your search

+6 -1
View File
@@ -141,18 +141,23 @@ type ProductsDTO struct {
// ---- /customers ----
// ApprovalCountDTO is a CountDTO plus how many of those loan orders were
// approved / rejected, so the UI can show approval rate per group.
// approved / rejected / still open, so the UI can show approval rate per group.
type ApprovalCountDTO struct {
Key string `json:"key"`
Count int64 `json:"count"`
Percent float64 `json:"percent"`
Approved int64 `json:"approved"`
Rejected int64 `json:"rejected"`
Open int64 `json:"open"`
ApprovalRate *float64 `json:"approvalRate"`
}
type CustomersDTO struct {
Total int64 `json:"total"`
Approved int64 `json:"approved"`
Rejected int64 `json:"rejected"`
Open int64 `json:"open"`
ApprovalRate *float64 `json:"approvalRate"`
AgeGroups []ApprovalCountDTO `json:"ageGroups"`
Education []ApprovalCountDTO `json:"education"`
MarriageStatus []ApprovalCountDTO `json:"marriageStatus"`