53 lines
1.5 KiB
Go
53 lines
1.5 KiB
Go
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"`
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
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"`
|
|
}
|