1
This commit is contained in:
52
business/model/print_temp.go
Normal file
52
business/model/print_temp.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type SystemTemp struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt *time.Time `json:"created_at" db:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updated_at" db:"updated_at"`
|
||||
LastOperator string `json:"last_operator" db:"last_operator"`
|
||||
DeletedAt *time.Time `json:"deleted_at" db:"deleted_at"`
|
||||
TempName string `json:"temp_name" db:"temp_name"` // 模板名称
|
||||
TempRank string `orm:"type(text)" json:"temp_rank" db:"temp_rank"` // 模板顺序
|
||||
Temp string `orm:"type(text)" json:"temp" db:"temp"` // 模板
|
||||
UserId string `json:"user_id" db:"user_id"` // 所属用户
|
||||
TempType string `json:"temp_type" db:"temp_type"` // 模板类型 user_store/user_consumer
|
||||
TempSize string `json:"temp_size" db:"temp_size"` // 模板尺寸 big/medium/small
|
||||
PrintSn string `json:"print_sn" db:"print_sn"` // 模板所属打印机
|
||||
IsUse int `json:"is_use" db:"is_use"` // 默认使用 1-使用/2-不使用
|
||||
Properties string `orm:"type(text)" json:"properties" db:"properties"` // 模板字段属性
|
||||
}
|
||||
|
||||
//func (v *SystemTemp) TableUnique() [][]string {
|
||||
// return [][]string{
|
||||
// []string{"PrintNo"},
|
||||
// }
|
||||
//}
|
||||
|
||||
func (v *SystemTemp) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"UserId", "TempType", "TempSize"},
|
||||
[]string{"PrintSn"},
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
TempTypeMerchantUser = `user_store` // 商户自定义模板-商户看
|
||||
TempTypeConsumerUser = `user_consumer` // 商户自定义模板-消费用户看
|
||||
TempTypeMerchant = `sys_store` // 系统模板-商户看
|
||||
TempTypeConsumer = `sys_consumer` // 系统模板-消费用户看
|
||||
)
|
||||
|
||||
const (
|
||||
SystemTempSizeBig = "big"
|
||||
SystemTempSizeSmall = "small"
|
||||
SystemTempSizeMedium = "medium"
|
||||
)
|
||||
const (
|
||||
SettingOpen = 1 // 开启
|
||||
SettingClose = -1 // 关闭
|
||||
)
|
||||
Reference in New Issue
Block a user