Files
online-backend/internal/admin/loansdocument/dto.go
GuwandykA ef56625321 Align loan type and required document schema with updated column names.
Rename loan_required_documents to loan_order_required_docs, simplify document fields to name/value, and map loan_types columns to name, maturity, notes, and active.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 22:48:19 +05:00

41 lines
948 B
Go

package loansdocument
import "time"
type LoanDocumentDTO struct {
Id int64 `json:"id"`
Name string `json:"name"`
Value string `json:"value"`
Active bool `json:"active"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type CreateLoanDocumentDTO struct {
Name string `json:"name" binding:"required"`
Value string `json:"value" binding:"required"`
Active *bool `json:"active"`
}
type UpdateLoanDocumentDTO struct {
Name string `json:"name" binding:"required"`
Value string `json:"value" binding:"required"`
Active bool `json:"active"`
}
type UpdateLoanDocumentActiveDTO struct {
Active bool `json:"active"`
}
type ListFilter struct {
DocumentName string
Active *bool
Page int
Limit int
}
type ListLoanDocumentDTO struct {
Count int64 `json:"count"`
LoansDocuments []LoanDocumentDTO `json:"loansDocuments"`
}