1
This commit is contained in:
92
business/model/print_setting.go
Normal file
92
business/model/print_setting.go
Normal file
@@ -0,0 +1,92 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// PrintSetting 打印机设置
|
||||
type PrintSetting 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"`
|
||||
DeletedAt time.Time `json:"deleted_at" db:"deleted_at"`
|
||||
PrintNo string `orm:"type(varchar);size(32)" json:"print_no" db:"print_no"` // 打印机编号
|
||||
CallNameSetting int `orm:"type(int);size(4);default(64)" json:"call_name_setting" db:"call_name_setting"` // 称谓设置 [64-默认老板]
|
||||
SystemVoice int `orm:"type(tinyint);size(2);default(1)" json:"system_voice" db:"system_voice"` // 平台语音开关[1打开]
|
||||
|
||||
PrintVoiceSetting string `orm:"type(varchar);size(255)" json:"print_voice_setting" db:"print_voice_setting"` // 打印机提示语音设置
|
||||
OrderVoiceSetting string `orm:"type(varchar);size(255)" json:"order_voice_setting" db:"order_voice_setting"` // 订单提示设置
|
||||
RiderVoiceSetting string `orm:"type(varchar);size(255)" json:"rider_voice_setting" db:"rider_voice_setting"` // 骑手动态提示设置
|
||||
CustomerVoiceSetting string `orm:"type(varchar);size(255)" json:"customer_voice_setting" db:"customer_voice_setting"` // 客户收货提示设置
|
||||
PickingSetting string `orm:"type(varchar);size(255)" json:"picking_setting" db:"picking_setting"` // 拣货语音设置
|
||||
}
|
||||
|
||||
func (v *PrintSetting) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"PrintNo"},
|
||||
}
|
||||
}
|
||||
|
||||
func (v *PrintSetting) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"CreatedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
// PrintVoice 打印机提示语音设置
|
||||
type PrintVoice struct {
|
||||
TimeVoice int `json:"time_voice"` // 平台语音开关[1打开]
|
||||
PaperShortageVoice int `json:"paper_shortage_voice"` // 缺纸语音开关[1打开]
|
||||
DisconnectVoice int `json:"disconnect_voice"` // 打印机断开连接提示[1打开]
|
||||
LoseAuthorization int `json:"lose_authorization"` // 失去授权语音提示[1打开]
|
||||
}
|
||||
|
||||
// OrderVoice 订单提示设置
|
||||
type OrderVoice struct {
|
||||
PrintOrder int `json:"print_order"` // 打印订单[1打开]必须
|
||||
OrderNotice int `json:"order_notice"` // 订单通知[1打开]必须
|
||||
UserOrderCancel int `json:"user_order_cancel"` // 用户取消订单打印[1打开]
|
||||
UserOrderCancelVoice int `json:"user_order_cancel_voice"` // 用户取消订单订单语音提示[1打开]
|
||||
RefundOrder int `json:"refund_order"` // 退款打印[1打开]
|
||||
RefundOrderVoice int `json:"refund_order_voice"` // 退款提示语音[1打开]
|
||||
BusinessOrderCancel int `json:"business_order_cancel"` // 商家取消打印[1打开]
|
||||
BusinessOrderCancelVoice int `json:"business_order_cancel_voice"` // 商家取消订单语音提示[1打开]
|
||||
}
|
||||
|
||||
// RiderVoice 骑手动态语音提示
|
||||
type RiderVoice struct {
|
||||
RiderTakeOrder int `json:"rider_take_order"` // 骑手接单打印[1打开]
|
||||
RiderTakeOrderVoice int `json:"rider_take_order_voice"` // 骑手接单语音[1打开]
|
||||
RiderServiceVoice int `json:"rider_service_voice"` // 骑手送达语音[1打开]
|
||||
RiderReminderVoice int `json:"rider_reminder_voice"` // 骑手催单语音[1打开]
|
||||
}
|
||||
|
||||
// CustomerReceivingGoods 客户收货语音提示
|
||||
type CustomerReceivingGoods struct {
|
||||
CustomerRejectionPrint int `json:"customer_rejection_print"` // 客户拒收打印[1打开]
|
||||
CustomerRejectionVoice int `json:"customer_rejection_voice"` // 客户拒收语音[1打开]
|
||||
CustcareRefundPrint int `json:"custcare_refund_print"` // 客服退款打印[1打开]
|
||||
CustcareRefundVoice int `json:"custcare_refund_voice"` // 客服退款语音[1打开]
|
||||
ConsultingPrint int `json:"consulting_print"` // 进店咨询打印[1打开]
|
||||
ConsultingVoice int `json:"consulting_voice"` // 进店咨询语音[1打开]
|
||||
}
|
||||
|
||||
// ShopPickingVoice 店铺拣货语音提示
|
||||
type ShopPickingVoice struct {
|
||||
BusinessOffLine int `json:"business_off_line"` // 店铺离线打印[1打开]
|
||||
BusinessOffLineVoice int `json:"business_off_line_voice"` // 店铺离线语音[1打开]
|
||||
WaitOrderPrint int `json:"wait_order_print"` // 待接单打印[1打开]
|
||||
WaitOrderVoice int `json:"wait_order_voice"` // 待接单语音[1打开]
|
||||
WaitPickingPrint int `json:"wait_picking_print"` // 待接单打印[1打开]
|
||||
WaitPickingVoice int `json:"wait_picking_voice"` // 待接单语音[1打开]
|
||||
}
|
||||
|
||||
// AddPrintSetting 打印机设置添加
|
||||
type AddPrintSetting struct {
|
||||
PrintNo string `json:"print_no" form:"print_no" binding:"required"`
|
||||
CallNameSetting int `json:"call_name_setting" form:"call_name_setting"`
|
||||
SystemVoice int `json:"system_voice" form:"system_voice"`
|
||||
PrintVoiceSetting *PrintVoice
|
||||
OrderVoiceSetting *OrderVoice
|
||||
RiderVoiceSetting *RiderVoice
|
||||
CustomerVoiceSetting *CustomerReceivingGoods
|
||||
PickingSetting *ShopPickingVoice
|
||||
}
|
||||
32
business/model/print_temp.go
Normal file
32
business/model/print_temp.go
Normal file
@@ -0,0 +1,32 @@
|
||||
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 `json:"temp_rank" db:"temp_rank"` // 模板顺序
|
||||
Temp string `json:"temp" db:"temp"` // 模板
|
||||
UserId string `json:"user_id" db:"user_id"` // 所属用户
|
||||
TempType string `json:"temp_type" db:"temp_type"` // 模板类型
|
||||
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-不使用
|
||||
}
|
||||
|
||||
//func (v *SystemTemp) TableUnique() [][]string {
|
||||
// return [][]string{
|
||||
// []string{"PrintNo"},
|
||||
// }
|
||||
//}
|
||||
|
||||
func (v *SystemTemp) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"UserId", "TempType", "TempSize"},
|
||||
[]string{"PrintSn"},
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ func Init() {
|
||||
// orm.RegisterDataBase("c4", "mysql", "root:WebServer@1@tcp(gold1.jxc4.com:3306)/jxd_dev_0?charset=utf8mb4&loc=Local&parseTime=true", 30)
|
||||
|
||||
orm.RegisterModel(&model.Apps{})
|
||||
orm.RegisterModel(&model.Printer{}, &model.PrintMsg{})
|
||||
orm.RegisterModel(&model.Printer{}, &model.PrintMsg{}, &model.PrintSetting{}, &model.SystemTemp{})
|
||||
orm.RegisterModel(&model.NewConfig{})
|
||||
orm.RegisterModel(&model.User{})
|
||||
orm.RegisterModel(&model.Place{})
|
||||
|
||||
Reference in New Issue
Block a user