mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
support using duplicate checker to prevent duplicate submissions for new transaction record
This commit is contained in:
+10
-9
@@ -69,15 +69,16 @@ type Account struct {
|
||||
|
||||
// AccountCreateRequest represents all parameters of account creation request
|
||||
type AccountCreateRequest struct {
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
Category AccountCategory `json:"category" binding:"required"`
|
||||
Type AccountType `json:"type" binding:"required"`
|
||||
Icon int64 `json:"icon,string" binding:"required,min=1"`
|
||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||
Currency string `json:"currency" binding:"required,len=3,validCurrency"`
|
||||
Balance int64 `json:"balance"`
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
SubAccounts []*AccountCreateRequest `json:"subAccounts" binding:"omitempty"`
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
Category AccountCategory `json:"category" binding:"required"`
|
||||
Type AccountType `json:"type" binding:"required"`
|
||||
Icon int64 `json:"icon,string" binding:"required,min=1"`
|
||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||
Currency string `json:"currency" binding:"required,len=3,validCurrency"`
|
||||
Balance int64 `json:"balance"`
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
SubAccounts []*AccountCreateRequest `json:"subAccounts" binding:"omitempty"`
|
||||
ClientSessionId string `json:"clientSessionId"`
|
||||
}
|
||||
|
||||
// AccountModifyRequest represents all parameters of account modification request
|
||||
|
||||
@@ -74,6 +74,7 @@ type TransactionCreateRequest struct {
|
||||
TagIds []string `json:"tagIds"`
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
GeoLocation *TransactionGeoLocationRequest `json:"geoLocation" binding:"omitempty"`
|
||||
ClientSessionId string `json:"clientSessionId"`
|
||||
}
|
||||
|
||||
// TransactionModifyRequest represents all parameters of transaction modification request
|
||||
|
||||
@@ -44,12 +44,13 @@ type TransactionCategoryGetRequest struct {
|
||||
|
||||
// TransactionCategoryCreateRequest represents all parameters of single transaction category creation request
|
||||
type TransactionCategoryCreateRequest struct {
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
Type TransactionCategoryType `json:"type" binding:"required"`
|
||||
ParentId int64 `json:"parentId,string" binding:"min=0"`
|
||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
||||
Type TransactionCategoryType `json:"type" binding:"required"`
|
||||
ParentId int64 `json:"parentId,string" binding:"min=0"`
|
||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||
Comment string `json:"comment" binding:"max=255"`
|
||||
ClientSessionId string `json:"clientSessionId"`
|
||||
}
|
||||
|
||||
// TransactionCategoryCreateBatchRequest represents all parameters of transaction category batch creation request
|
||||
|
||||
Reference in New Issue
Block a user