mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
set name column length to 64
This commit is contained in:
@@ -64,7 +64,7 @@ type Account struct {
|
|||||||
Category AccountCategory `xorm:"NOT NULL"`
|
Category AccountCategory `xorm:"NOT NULL"`
|
||||||
Type AccountType `xorm:"NOT NULL"`
|
Type AccountType `xorm:"NOT NULL"`
|
||||||
ParentAccountId int64 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"`
|
ParentAccountId int64 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"`
|
||||||
Name string `xorm:"VARCHAR(32) NOT NULL"`
|
Name string `xorm:"VARCHAR(64) NOT NULL"`
|
||||||
DisplayOrder int32 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"`
|
DisplayOrder int32 `xorm:"INDEX(IDX_account_uid_deleted_parent_account_id_order) NOT NULL"`
|
||||||
Icon int64 `xorm:"NOT NULL"`
|
Icon int64 `xorm:"NOT NULL"`
|
||||||
Color string `xorm:"VARCHAR(6) NOT NULL"`
|
Color string `xorm:"VARCHAR(6) NOT NULL"`
|
||||||
@@ -85,7 +85,7 @@ type AccountExtend struct {
|
|||||||
|
|
||||||
// AccountCreateRequest represents all parameters of account creation request
|
// AccountCreateRequest represents all parameters of account creation request
|
||||||
type AccountCreateRequest struct {
|
type AccountCreateRequest struct {
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
Category AccountCategory `json:"category" binding:"required"`
|
Category AccountCategory `json:"category" binding:"required"`
|
||||||
Type AccountType `json:"type" binding:"required"`
|
Type AccountType `json:"type" binding:"required"`
|
||||||
Icon int64 `json:"icon,string" binding:"required,min=1"`
|
Icon int64 `json:"icon,string" binding:"required,min=1"`
|
||||||
@@ -102,7 +102,7 @@ type AccountCreateRequest struct {
|
|||||||
// AccountModifyRequest represents all parameters of account modification request
|
// AccountModifyRequest represents all parameters of account modification request
|
||||||
type AccountModifyRequest struct {
|
type AccountModifyRequest struct {
|
||||||
Id int64 `json:"id,string" binding:"required,min=1"`
|
Id int64 `json:"id,string" binding:"required,min=1"`
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
Category AccountCategory `json:"category" binding:"required"`
|
Category AccountCategory `json:"category" binding:"required"`
|
||||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type TransactionCategory struct {
|
|||||||
Deleted bool `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
Deleted bool `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
||||||
Type TransactionCategoryType `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
Type TransactionCategoryType `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
||||||
ParentCategoryId int64 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
ParentCategoryId int64 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
||||||
Name string `xorm:"VARCHAR(32) NOT NULL"`
|
Name string `xorm:"VARCHAR(64) NOT NULL"`
|
||||||
DisplayOrder int32 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
DisplayOrder int32 `xorm:"INDEX(IDX_category_uid_deleted_type_parent_category_id_order) NOT NULL"`
|
||||||
Icon int64 `xorm:"NOT NULL"`
|
Icon int64 `xorm:"NOT NULL"`
|
||||||
Color string `xorm:"VARCHAR(6) NOT NULL"`
|
Color string `xorm:"VARCHAR(6) NOT NULL"`
|
||||||
@@ -44,7 +44,7 @@ type TransactionCategoryGetRequest struct {
|
|||||||
|
|
||||||
// TransactionCategoryCreateRequest represents all parameters of single transaction category creation request
|
// TransactionCategoryCreateRequest represents all parameters of single transaction category creation request
|
||||||
type TransactionCategoryCreateRequest struct {
|
type TransactionCategoryCreateRequest struct {
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
Type TransactionCategoryType `json:"type" binding:"required"`
|
Type TransactionCategoryType `json:"type" binding:"required"`
|
||||||
ParentId int64 `json:"parentId,string" binding:"min=0"`
|
ParentId int64 `json:"parentId,string" binding:"min=0"`
|
||||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||||
@@ -60,7 +60,7 @@ type TransactionCategoryCreateBatchRequest struct {
|
|||||||
|
|
||||||
// TransactionCategoryCreateWithSubCategories represents all parameters of multi transaction categories creation request
|
// TransactionCategoryCreateWithSubCategories represents all parameters of multi transaction categories creation request
|
||||||
type TransactionCategoryCreateWithSubCategories struct {
|
type TransactionCategoryCreateWithSubCategories struct {
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
Type TransactionCategoryType `json:"type" binding:"required"`
|
Type TransactionCategoryType `json:"type" binding:"required"`
|
||||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||||
@@ -71,7 +71,7 @@ type TransactionCategoryCreateWithSubCategories struct {
|
|||||||
// TransactionCategoryModifyRequest represents all parameters of transaction category modification request
|
// TransactionCategoryModifyRequest represents all parameters of transaction category modification request
|
||||||
type TransactionCategoryModifyRequest struct {
|
type TransactionCategoryModifyRequest struct {
|
||||||
Id int64 `json:"id,string" binding:"required,min=1"`
|
Id int64 `json:"id,string" binding:"required,min=1"`
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
ParentId int64 `json:"parentId,string" binding:"min=0"`
|
ParentId int64 `json:"parentId,string" binding:"min=0"`
|
||||||
Icon int64 `json:"icon,string" binding:"min=1"`
|
Icon int64 `json:"icon,string" binding:"min=1"`
|
||||||
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
Color string `json:"color" binding:"required,len=6,validHexRGBColor"`
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ type TransactionTag struct {
|
|||||||
TagId int64 `xorm:"PK"`
|
TagId int64 `xorm:"PK"`
|
||||||
Uid int64 `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"`
|
Uid int64 `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"`
|
||||||
Deleted bool `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"`
|
Deleted bool `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"`
|
||||||
Name string `xorm:"VARCHAR(32) NOT NULL"`
|
Name string `xorm:"VARCHAR(64) NOT NULL"`
|
||||||
DisplayOrder int32 `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"`
|
DisplayOrder int32 `xorm:"INDEX(IDX_tag_uid_deleted_order) NOT NULL"`
|
||||||
Hidden bool `xorm:"NOT NULL"`
|
Hidden bool `xorm:"NOT NULL"`
|
||||||
CreatedUnixTime int64
|
CreatedUnixTime int64
|
||||||
@@ -20,13 +20,13 @@ type TransactionTagGetRequest struct {
|
|||||||
|
|
||||||
// TransactionTagCreateRequest represents all parameters of transaction tag creation request
|
// TransactionTagCreateRequest represents all parameters of transaction tag creation request
|
||||||
type TransactionTagCreateRequest struct {
|
type TransactionTagCreateRequest struct {
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransactionTagModifyRequest represents all parameters of transaction tag modification request
|
// TransactionTagModifyRequest represents all parameters of transaction tag modification request
|
||||||
type TransactionTagModifyRequest struct {
|
type TransactionTagModifyRequest struct {
|
||||||
Id int64 `json:"id,string" binding:"required,min=1"`
|
Id int64 `json:"id,string" binding:"required,min=1"`
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransactionTagHideRequest represents all parameters of transaction tag hiding request
|
// TransactionTagHideRequest represents all parameters of transaction tag hiding request
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ type TransactionTemplate struct {
|
|||||||
Uid int64 `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) NOT NULL"`
|
Uid int64 `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) NOT NULL"`
|
||||||
Deleted bool `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_at) NOT NULL"`
|
Deleted bool `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_at) NOT NULL"`
|
||||||
TemplateType TransactionTemplateType `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_at) NOT NULL"`
|
TemplateType TransactionTemplateType `xorm:"INDEX(IDX_transaction_template_uid_deleted_template_type_order) INDEX(IDX_transaction_template_deleted_type_freqtype_scheduled_at) NOT NULL"`
|
||||||
Name string `xorm:"VARCHAR(32) NOT NULL"`
|
Name string `xorm:"VARCHAR(64) NOT NULL"`
|
||||||
Type TransactionType `xorm:"NOT NULL"`
|
Type TransactionType `xorm:"NOT NULL"`
|
||||||
CategoryId int64 `xorm:"NOT NULL"`
|
CategoryId int64 `xorm:"NOT NULL"`
|
||||||
AccountId int64 `xorm:"NOT NULL"`
|
AccountId int64 `xorm:"NOT NULL"`
|
||||||
@@ -65,7 +65,7 @@ type TransactionTemplateGetRequest struct {
|
|||||||
// TransactionTemplateCreateRequest represents all parameters of transaction template creation request
|
// TransactionTemplateCreateRequest represents all parameters of transaction template creation request
|
||||||
type TransactionTemplateCreateRequest struct {
|
type TransactionTemplateCreateRequest struct {
|
||||||
TemplateType TransactionTemplateType `json:"templateType"`
|
TemplateType TransactionTemplateType `json:"templateType"`
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
Type TransactionType `json:"type" binding:"required"`
|
Type TransactionType `json:"type" binding:"required"`
|
||||||
CategoryId int64 `json:"categoryId,string" binding:"required,min=1"`
|
CategoryId int64 `json:"categoryId,string" binding:"required,min=1"`
|
||||||
SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"`
|
SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"`
|
||||||
@@ -84,13 +84,13 @@ type TransactionTemplateCreateRequest struct {
|
|||||||
// TransactionTemplateModifyNameRequest represents all parameters of transaction template name modification request
|
// TransactionTemplateModifyNameRequest represents all parameters of transaction template name modification request
|
||||||
type TransactionTemplateModifyNameRequest struct {
|
type TransactionTemplateModifyNameRequest struct {
|
||||||
Id int64 `json:"id,string" binding:"required,min=1"`
|
Id int64 `json:"id,string" binding:"required,min=1"`
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransactionTemplateModifyRequest represents all parameters of transaction template modification request
|
// TransactionTemplateModifyRequest represents all parameters of transaction template modification request
|
||||||
type TransactionTemplateModifyRequest struct {
|
type TransactionTemplateModifyRequest struct {
|
||||||
Id int64 `json:"id,string" binding:"required,min=1"`
|
Id int64 `json:"id,string" binding:"required,min=1"`
|
||||||
Name string `json:"name" binding:"required,notBlank,max=32"`
|
Name string `json:"name" binding:"required,notBlank,max=64"`
|
||||||
Type TransactionType `json:"type" binding:"required"`
|
Type TransactionType `json:"type" binding:"required"`
|
||||||
CategoryId int64 `json:"categoryId,string" binding:"required,min=1"`
|
CategoryId int64 `json:"categoryId,string" binding:"required,min=1"`
|
||||||
SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"`
|
SourceAccountId int64 `json:"sourceAccountId,string" binding:"required,min=1"`
|
||||||
|
|||||||
Reference in New Issue
Block a user