add field name to document

This commit is contained in:
giovanni
2026-05-07 16:03:47 +07:00
parent 0d6ab5e718
commit 6f02387d69
@@ -86,6 +86,7 @@ type KandangGroupDTO struct {
type DocumentDTO struct {
ID uint64 `json:"id"`
Path string `json:"path"`
Name string `json:"name"`
}
// === MAPPERS ===
@@ -184,6 +185,7 @@ func ToExpenseDetailDTO(e *entity.Expense) ExpenseDetailDTO {
documents = append(documents, DocumentDTO{
ID: uint64(doc.Id),
Path: doc.Path,
Name: doc.Name,
})
}
@@ -191,6 +193,7 @@ func ToExpenseDetailDTO(e *entity.Expense) ExpenseDetailDTO {
realizationDocs = append(realizationDocs, DocumentDTO{
ID: uint64(doc.Id),
Path: doc.Path,
Name: doc.Name,
})
}