mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 16:54:25 +08:00
code refactor
This commit is contained in:
@@ -28,6 +28,15 @@ type TransactionCategory struct {
|
||||
DeletedUnixTime int64
|
||||
}
|
||||
|
||||
type TransactionCategoryListRequest struct {
|
||||
Type TransactionCategoryType `form:"type" binding:"min=0"`
|
||||
ParentId int64 `form:"parent_id,string,default=-1" binding:"min=-1"`
|
||||
}
|
||||
|
||||
type TransactionCategoryGetRequest struct {
|
||||
Id int64 `form:"id,string" binding:"required,min=1"`
|
||||
}
|
||||
|
||||
type TransactionCategoryCreateRequest struct {
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
Type TransactionCategoryType `json:"type" binding:"required"`
|
||||
@@ -50,15 +59,6 @@ type TransactionCategoryCreateWithSubCategories struct {
|
||||
SubCategories []*TransactionCategoryCreateRequest `json:"subCategories" binding:"required"`
|
||||
}
|
||||
|
||||
type TransactionCategoryListRequest struct {
|
||||
Type TransactionCategoryType `form:"type" binding:"min=0"`
|
||||
ParentId int64 `form:"parent_id,string,default=-1" binding:"min=-1"`
|
||||
}
|
||||
|
||||
type TransactionCategoryGetRequest struct {
|
||||
Id int64 `form:"id,string" binding:"required,min=1"`
|
||||
}
|
||||
|
||||
type TransactionCategoryModifyRequest struct {
|
||||
Id int64 `json:"id,string" binding:"required,min=1"`
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
|
||||
Reference in New Issue
Block a user