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>
This commit is contained in:
guwandykandCursor committed 2026-07-06 22:48:19 +05:00
1 parent 08be61cbcd
commit ef56625321
9 files changed
+66 -89

No files matched your search

+12 -24
View File
@@ -2,37 +2,25 @@ package loansdocument
import "time"
type LocalizedTitle struct {
En string `json:"en"`
Ru string `json:"ru"`
Tm string `json:"tm"`
}
type LoanDocumentDTO struct {
Id int64 `json:"id"`
Title LocalizedTitle `json:"title"`
ContentEn string `json:"contentEn"`
ContentRu string `json:"contentRu"`
ContentTm string `json:"contentTm"`
Active bool `json:"active"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
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 {
Title LocalizedTitle `json:"title" binding:"required"`
ContentEn string `json:"contentEn" binding:"required"`
ContentRu string `json:"contentRu" binding:"required"`
ContentTm string `json:"contentTm" binding:"required"`
Active *bool `json:"active"`
Name string `json:"name" binding:"required"`
Value string `json:"value" binding:"required"`
Active *bool `json:"active"`
}
type UpdateLoanDocumentDTO struct {
Title LocalizedTitle `json:"title" binding:"required"`
ContentEn string `json:"contentEn" binding:"required"`
ContentRu string `json:"contentRu" binding:"required"`
ContentTm string `json:"contentTm" binding:"required"`
Active bool `json:"active"`
Name string `json:"name" binding:"required"`
Value string `json:"value" binding:"required"`
Active bool `json:"active"`
}
type UpdateLoanDocumentActiveDTO struct {