48 lines
1.4 KiB
Go
48 lines
1.4 KiB
Go
package model
|
|
|
|
const (
|
|
PrinterStatusOnlineWithoutPaper = 2 //在线正常缺纸
|
|
PrinterStatusOnline = 1 //在线正常
|
|
PrinterStatusOffline = -1 //离线
|
|
|
|
PrintMsgAlreadySend = 2 //已经发出打印消息
|
|
PrintMsgSuccess = 1 //打印成功
|
|
PrintMsgWait = 0 //待打印
|
|
PrintMsgFail = -1 //打印失败(打印机报出)
|
|
PrintMsgErr = -2 //京西报出
|
|
PrintMsgAll = -9
|
|
)
|
|
|
|
type Printer struct {
|
|
ModelIDCULD
|
|
|
|
AppID int `orm:"column(app_id)" json:"app_id"` //应用编号
|
|
PrintNo string `json:"print_no"` //打印机编号
|
|
PrintKey string `json:"print_key"` //打印机识别码
|
|
Name string `json:"name"` //打印机备注名
|
|
Status int `json:"status"` //打印机状态
|
|
}
|
|
|
|
func (v *Printer) TableIndex() [][]string {
|
|
return [][]string{
|
|
[]string{"PrintNo"},
|
|
}
|
|
}
|
|
|
|
type PrintMsg struct {
|
|
ModelIDCULD
|
|
|
|
MsgID string `orm:"column(msg_id)" json:"msg_id"` //消息ID
|
|
PrintNo string `json:"print_no"` //打印机编号
|
|
OrderNo int `json:"order_no"` //订单序号
|
|
Content string `orm:"type(text)" json:"content"` //订单内容
|
|
Status int `json:"status"` //打印状态
|
|
Comment string `json:"comment"` //失败原因
|
|
}
|
|
|
|
func (v *PrintMsg) TableIndex() [][]string {
|
|
return [][]string{
|
|
[]string{"PrintNo"},
|
|
}
|
|
}
|