mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 15:37:33 +08:00
add default categories backend
This commit is contained in:
@@ -37,6 +37,19 @@ type TransactionCategoryCreateRequest struct {
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
}
|
||||
|
||||
type TransactionCategoryCreateBatchRequest struct {
|
||||
Categories []*TransactionCategoryCreateWithSubCategories `json:"categories" binding:"required"`
|
||||
}
|
||||
|
||||
type TransactionCategoryCreateWithSubCategories struct {
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
Type TransactionCategoryType `json:"type" binding:"required"`
|
||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
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"`
|
||||
|
||||
Reference in New Issue
Block a user