feat[BE]: add address field to CustomerRelationDTO and refactor payment report functions for improved clarity and structure

This commit is contained in:
aguhh18
2026-01-15 10:41:44 +07:00
parent 3a89e18b16
commit c316a6d7a9
3 changed files with 30 additions and 24 deletions
@@ -14,6 +14,7 @@ type CustomerRelationDTO struct {
Name string `json:"name"`
Type string `json:"type"`
AccountNumber string `json:"account_number"`
Address string `json:"address,omitempty"`
Balance float64 `json:"balance"`
Pic *userDTO.UserRelationDTO `json:"pic,omitempty"`
}
@@ -52,6 +53,7 @@ func ToCustomerRelationDTO(e entity.Customer) CustomerRelationDTO {
Name: e.Name,
Type: e.Type,
AccountNumber: e.AccountNumber,
Address: e.Address,
Balance: e.Balance,
Pic: pic,
}