changed arhitecture
This commit is contained in:
40
internal/lending/loansdocument/dto.go
Normal file
40
internal/lending/loansdocument/dto.go
Normal file
@@ -0,0 +1,40 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user