Files
jx-callback/business/model/print.go
suyl b94de1d201 aa
2021-07-20 16:52:41 +08:00

84 lines
2.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
const (
PrinterStatusOnlineWithoutPaper = 2 //在线缺纸
PrinterStatusOnline = 1 //在线正常
PrinterStatusOffline = -1 //离线
PrinterStatusNoFlow = -2 //当月流量超30m了
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"` //打印机状态
IsOnline int `json:"is_online"` //1在线0离线
IccID string `orm:"column(icc_id)" json:"IccID"` //sim卡号
Sound string `json:"sound"` //声音类型 sounda ,b,c,d,e,f,g
Volume int `json:"volume"` //音量1-5 对应打印机2-10
}
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"},
}
}
//流量支出
type SimFlowExpend struct {
ModelIDCUL
IccID string `orm:"column(icc_id)" json:"iccID"` //sim卡iccid
Flow float64 `json:"flow"` //流量数
FlowUnit string `json:"flowUnit"` //流量单位
}
func (v *SimFlowExpend) TableIndex() [][]string {
return [][]string{
[]string{"IccID"},
}
}
//流量划入
type SimFlowIncome struct {
ModelIDCUL
IccID string `orm:"column(icc_id)" json:"iccID"` //sim卡iccid
Flow float64 `json:"flow"` //流量数
FlowUnit string `json:"flowUnit"` //流量单位
IncomeType int `json:"incomeType"` //1 表示系统每月自动划转2 表示商户自己冲的
}
func (v *SimFlowIncome) TableIndex() [][]string {
return [][]string{
[]string{"IccID"},
}
}