aa
This commit is contained in:
@@ -801,3 +801,58 @@ func (*BrandStore) TableUnique() [][]string {
|
|||||||
[]string{"Name"},
|
[]string{"Name"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//门店账户收入
|
||||||
|
type StoreAcctIncome struct {
|
||||||
|
ModelIDCUL
|
||||||
|
|
||||||
|
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
||||||
|
UserID string `orm:"column(user_id)" json:"userID"` //用户ID (谁消费的)
|
||||||
|
Type int `json:"type"` //收入类型
|
||||||
|
IncomePrice int `json:"incomePrice"` //收入金额
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *StoreAcctIncome) TableIndex() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"StoreID"},
|
||||||
|
[]string{"CreatedAt"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//门店账户支出
|
||||||
|
type StoreAcctExpend struct {
|
||||||
|
ModelIDCUL
|
||||||
|
|
||||||
|
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
||||||
|
UserID string `orm:"column(user_id)" json:"userID"` //用户ID (谁消费的)
|
||||||
|
Type int `json:"type"` //支出类型
|
||||||
|
ExpendPrice int `json:"expendPrice"` //支出金额
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *StoreAcctExpend) TableIndex() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"StoreID"},
|
||||||
|
[]string{"CreatedAt"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//门店账单表
|
||||||
|
type StoreAcct struct {
|
||||||
|
ModelIDCULD
|
||||||
|
|
||||||
|
StoreID int `orm:"column(store_id)" json:"storeID"` //门店ID
|
||||||
|
AccountBalance int `json:"accountBalance"` //账户余额
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *StoreAcct) TableUnique() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"StoreID"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *StoreAcct) TableIndex() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"CreatedAt"},
|
||||||
|
[]string{"AccountBalance"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -99,6 +99,12 @@ func Init() {
|
|||||||
orm.RegisterModel(&model.UserRole{})
|
orm.RegisterModel(&model.UserRole{})
|
||||||
orm.RegisterModel(&model.Menu{})
|
orm.RegisterModel(&model.Menu{})
|
||||||
orm.RegisterModel(&model.RoleMenu{})
|
orm.RegisterModel(&model.RoleMenu{})
|
||||||
|
|
||||||
|
//门店账单
|
||||||
|
orm.RegisterModel(&model.StoreAcct{})
|
||||||
|
orm.RegisterModel(&model.StoreAcctExpend{})
|
||||||
|
orm.RegisterModel(&model.StoreAcctIncome{})
|
||||||
|
|
||||||
// create table
|
// create table
|
||||||
orm.RunSyncdb("default", false, true)
|
orm.RunSyncdb("default", false, true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user