1
This commit is contained in:
16
business/model/print_activation.go
Normal file
16
business/model/print_activation.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// PrintActivation 打印机激活记录
|
||||
type PrintActivation struct {
|
||||
ID int `orm:"column(id)" json:"id" db:"id"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号
|
||||
}
|
||||
|
||||
func (v *PrintActivation) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"PrintNo"},
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ func Init() {
|
||||
orm.RegisterModel(&model.OrderPay{})
|
||||
orm.RegisterModel(&model.PrintBillRecord{})
|
||||
orm.RegisterModel(&model.PrintBindStore{})
|
||||
orm.RegisterModel(&model.PrintActivation{})
|
||||
// create table
|
||||
orm.RunSyncdb("default", false, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user