You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
6.2 KiB
111 lines
6.2 KiB
package common |
|
|
|
// 客服工单状态 |
|
const ( |
|
CustomerOrderCreate = iota + 1 // 创建工单 |
|
CustomerOrderAllocate // 工单已分配 |
|
CustomerOrderProcessing // 工单处理中 |
|
CustomerOrderDelayed // 工单延期 |
|
CustomerOrderComplete // 工单已完成 工单到此结束 |
|
) |
|
|
|
// 客服系统机器人配置 |
|
type ConfigCustomerRobot struct { |
|
ID int `gorm:"primarykey"` |
|
ParentId int `gorm:"column:parent_id;default:0;type:int(11);comment:父类id 0表示一级标题" json:"ParentId" web:"ParentId"` |
|
Label string `gorm:"column:label;type:varchar(128);comment:工单标签描述" json:"Label" web:"Label"` |
|
Title string `gorm:"column:title;type:varchar(128);comment:标题" json:"Title" web:"Title"` |
|
Content string `gorm:"column:content;type:varchar(1280);comment:内容" json:"Content" web:"Content"` |
|
Image string `gorm:"column:image;type:varchar(1280);comment:图片用英文逗号分隔地址" json:"Image" web:"Image"` |
|
IsEnd bool `gorm:"column:is_end;not null;type:bool;comment:是否截止" json:"IsEnd" web:"IsEnd"` |
|
} |
|
|
|
func (c *ConfigCustomerRobot) TableName() string { |
|
return "config_customer_robot" |
|
} |
|
|
|
// 客服系统聊天配置 |
|
type CustomerChatData struct { |
|
ID int `gorm:"primarykey"` |
|
Title int `gorm:"column:title;not null;type:int(11);comment:用玩家uid做聊天的title" json:"Title" web:"Title"` |
|
Uid int `gorm:"column:uid;not null;type:int(11);comment:玩家uid或者客服人员uid" json:"Uid" web:"Uid"` |
|
Time int64 `gorm:"column:time;type:int(11);default:0;comment:当前时间" json:"Time" web:"Time"` |
|
Type int `gorm:"column:type;type:int(11);default:0;comment:消息类型 1表示文字消息,2表示图片消息" json:"Type" web:"Type"` |
|
Content string `gorm:"column:content;type:varchar(1280);comment:消息内容 文字消息直接显示 图片消息用英文逗号分隔地址" json:"Content" web:"Content"` |
|
IsRead bool `gorm:"column:is_read;type:bool;comment:消息是否已读" json:"IsRead" web:"IsRead"` |
|
} |
|
|
|
func (c *CustomerChatData) TableName() string { |
|
return "customer_chat_data" |
|
} |
|
|
|
// 人工服务工单 |
|
type CustomerOrder struct { |
|
ID int `gorm:"primarykey"` |
|
Uid int `gorm:"column:uid;not null;type:int(11);comment:玩家uid" json:"Uid" web:"Uid"` |
|
Status int `gorm:"column:status;not null;type:int(11);comment:工单状态 1创建工单(未分配工单),2已分配工单,3工单处理中,4延期,5完成" json:"Status" web:"Status"` |
|
CreateTime int64 `gorm:"column:create_time;type:bigint(20);default:0;comment:订单创建时间" json:"CreateTime" web:"create_time"` |
|
Start int64 `gorm:"column:start;type:int(11);default:0;comment:工单开始时间" json:"Start" web:"Start"` |
|
End int64 `gorm:"column:end;type:int(11);default:0;comment:工单结束时间" json:"End" web:"End"` |
|
CustomerUid int `gorm:"column:customer_uid;type:int(11);default:0;comment:客服人员uid,0表示未分配工单, -1表示机器人处理的订单" json:"CustomerUid" web:"CustomerUid"` |
|
Vip int `gorm:"column:vip;type:int(11);default:0;comment:玩家vip等级" json:"Vip" web:"Vip"` |
|
Label1 int `gorm:"column:Label1;type:int(11);default:0;comment:处理人员标记该工单类型" json:"Label1" web:"Label1"` |
|
Label2 int `gorm:"column:label2;type:int(11);default:0;comment:处理人员标记该工单类型" json:"Label2" web:"Label2"` |
|
Label3 int `gorm:"column:label3;type:int(11);default:0;comment:处理人员标记该工单类型" json:"Label3" web:"Label3"` |
|
Label4 int `gorm:"column:label4;type:int(11);default:0;comment:处理人员标记该工单类型" json:"Label4" web:"Label4"` |
|
Label5 int `gorm:"column:label5;type:int(11);default:0;comment:处理人员标记该工单类型" json:"Label5" web:"Label5"` |
|
UnRead int `gorm:"column:un_read;type:int(11);default:0;comment:未读消息条数" json:"UnRead" web:"UnRead"` |
|
IsRead bool `gorm:"column:is_read;type:bool;default:true;comment:玩家是否查看消息"` |
|
Reply bool `gorm:"column:reply;type:bool;default:true;comment:客服是否回复"` |
|
Remark string `gorm:"column:remark;type:varchar(255);comment:备注" web:"remark"` |
|
OrderID string `gorm:"column:order_id;type:varchar(256);comment:订单id,充值客诉时会有值" web:"order_id"` |
|
AssignTime int64 `gorm:"column:assign_time;type:bigint(20);default:0;comment:分配时间" json:"AssignTime" web:"assign_time"` |
|
FirstReplyTime int64 `gorm:"column:first_reply_time;type:bigint(20);default:0;comment:首次回复时间" json:"FirstReplyTime" web:"first_reply_time"` |
|
SuccessTime int64 `gorm:"column:success_time;type:bigint(20);default:0;comment:订单成功时间" json:"SuccessTime" web:"success_time"` |
|
} |
|
|
|
func (c *CustomerOrder) TableName() string { |
|
return "customer_order" |
|
} |
|
|
|
// 客服标签分组 |
|
type CustomerOrderLabel struct { |
|
ID int `gorm:"primarykey"` |
|
Label string `gorm:"column:label;type:varchar(20);comment:工单标签描述" json:"Label" web:"Label"` |
|
} |
|
|
|
func (c *CustomerOrderLabel) TableName() string { |
|
return "customer_order_label" |
|
} |
|
|
|
// 客服配置 |
|
type ConfigCustomer struct { |
|
ID int `gorm:"primarykey"` |
|
Vip int `gorm:"column:vip;type:int(11);default:3;comment:默认走人工服务vip等级" json:"Vip" web:"Vip"` |
|
} |
|
|
|
func (c *ConfigCustomer) TableName() string { |
|
return "config_customer" |
|
} |
|
|
|
// 客服黑名单 |
|
type CustomerBlackUser struct { |
|
ID int `gorm:"primarykey"` |
|
Time int64 `gorm:"column:time;type:int(20);default:0;comment:当前时间" json:"Time" web:"time"` |
|
Uid int `gorm:"column:uid;not null;type:int(11);uniqueIndex:uid;comment:玩家uid" json:"Uid" web:"uid"` |
|
} |
|
|
|
func (c *CustomerBlackUser) TableName() string { |
|
return "customer_black_user" |
|
} |
|
|
|
type ConfigCustomerPhrases struct { |
|
ID int `gorm:"primarykey"` |
|
ParentId int `gorm:"column:parent_id;default:0;type:int(11);comment:父类id 0表示一级标题" web:"parent_id"` |
|
Content string `gorm:"column:content;type:varchar(1280);comment:内容" web:"content"` |
|
IsSend bool `gorm:"column:is_send;not null;type:bool;comment:是否发送,为true时,直接发送content出去给玩家" web:"is_send"` |
|
} |
|
|
|
func (c *ConfigCustomerPhrases) TableName() string { |
|
return "config_customer_phrases" |
|
}
|
|
|