code refactor

This commit is contained in:
MaysWind
2020-12-06 20:26:43 +08:00
parent 15d6a93a71
commit 2ac80eef2c
3 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -62,6 +62,10 @@ type Account struct {
DeletedUnixTime int64
}
type AccountGetRequest struct {
Id int64 `form:"id,string" binding:"required,min=1"`
}
type AccountCreateRequest struct {
Name string `json:"name" binding:"required,notBlank,max=32"`
Category AccountCategory `json:"category" binding:"required"`
@@ -73,10 +77,6 @@ type AccountCreateRequest struct {
SubAccounts []*AccountCreateRequest `json:"subAccounts" binding:"omitempty"`
}
type AccountGetRequest struct {
Id int64 `form:"id,string" binding:"required,min=1"`
}
type AccountModifyRequest struct {
Id int64 `json:"id,string" binding:"required,min=1"`
Name string `json:"name" binding:"required,notBlank,max=32"`