🎨 添加图库和客服插件(有问题-待修改)
This commit is contained in:
25
plugin/customerservice/model/model.go
Normal file
25
plugin/customerservice/model/model.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package model
|
||||
|
||||
type PageInfo struct {
|
||||
Page int `json:"page" form:"page"`
|
||||
Limit int `json:"limit" form:"limit"`
|
||||
Keyword string `json:"keyword" form:"keyword"`
|
||||
}
|
||||
|
||||
type MsgPageInfo struct {
|
||||
Page int `json:"page" form:"page"`
|
||||
Limit int `json:"limit" form:"limit"`
|
||||
FromId int `json:"from_id" form:"from_id"`
|
||||
}
|
||||
|
||||
type AutoPageInfo struct {
|
||||
Page int `json:"page" form:"page"`
|
||||
Limit int `json:"limit" form:"limit"`
|
||||
Keyword string `json:"keyword" form:"keyword"`
|
||||
ReplyType int `json:"reply_type" form:"reply_type"`
|
||||
}
|
||||
|
||||
type LoginInfo struct {
|
||||
Account string `json:"account" form:"account"`
|
||||
Password string `json:"password" form:"password"`
|
||||
}
|
||||
18
plugin/customerservice/model/sysService.go
Normal file
18
plugin/customerservice/model/sysService.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
type SysService struct {
|
||||
Id int64 `json:"id" form:"id" gorm:"primarykey"`
|
||||
MerchantId uint `json:"merchant_id" form:"merchant_id" gorm:"default:0;type:int;column:merchant_id;comment:商户id;"`
|
||||
Uid uint `json:"uid" form:"uid" gorm:"default:0;type:int;column:uid;comment:用户id;"`
|
||||
Online uint `json:"online" form:"online" gorm:"default:0;type:tinyint;column:online;comment:客服是否在线;"`
|
||||
Account string `json:"account" form:"account" gorm:"default:'';type:varchar(255);column:account;comment:账户;"`
|
||||
Password string `json:"password" form:"password" gorm:"default:'';type:varchar(255);column:password;comment:密码;"`
|
||||
Avatar string `json:"avatar" form:"avatar" gorm:"default:'';type:varchar(255);column:avatar;comment:头像;"`
|
||||
Nickname string `json:"nickname" form:"nickname" gorm:"default:'';type:varchar(255);column:nickname;comment:客服名称;"`
|
||||
AddTime int64 `json:"add_time" form:"add_time" gorm:"default:0;type:int;column:add_time;comment:添加时间;"`
|
||||
Status *uint `json:"status" form:"status" gorm:"default:0;type:tinyint(1);column:status;comment:是否显示;"`
|
||||
}
|
||||
|
||||
func (SysService) TableName() string {
|
||||
return "sys_service"
|
||||
}
|
||||
18
plugin/customerservice/model/sysServiceMsg.go
Normal file
18
plugin/customerservice/model/sysServiceMsg.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
type SysServiceMsg struct {
|
||||
Id uint `gorm:"primarykey" json:"id"` // 主键ID
|
||||
MerchantId uint `json:"merchant_id" form:"merchant_id" gorm:"default:0;type:int;column:merchant_id;comment:商户id;"`
|
||||
Content string `json:"content" form:"content" gorm:"type:text;column:content;comment:消息内容;"`
|
||||
ServiceId int64 `json:"service_id" form:"service_id" gorm:"default:0;type:int;column:service_id;comment:客服id;"`
|
||||
Uid int64 `json:"uid" form:"uid" gorm:"default:0;type:int;column:uid;comment:用户id;"`
|
||||
IsTourist uint `json:"is_tourist" form:"is_tourist" gorm:"default:0;type:tinyint;column:is_tourist;comment:是否游客;"`
|
||||
IsView uint `json:"is_view" form:"is_view" gorm:"default:0;type:tinyint;column:is_view;comment:是否已读;"`
|
||||
AddTime int `json:"add_time" form:"add_time" gorm:"default:0;type:int;column:add_time;comment:添加时间;"`
|
||||
MsgType int64 `json:"msg_type" form:"msg_type" gorm:"default:1;type:tinyint;column:msg_type;comment:消息类型 1=文字 2=表情 3=图片 4=语音 5=视频 6=商品;"`
|
||||
IsKf int64 `json:"is_kf" form:"is_kf" gorm:"default:0;type:tinyint;column:is_kf;comment:是否客服消息;"`
|
||||
}
|
||||
|
||||
func (SysServiceMsg) TableName() string {
|
||||
return "sys_service_msg"
|
||||
}
|
||||
21
plugin/customerservice/model/sysServiceRecord.go
Normal file
21
plugin/customerservice/model/sysServiceRecord.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package model
|
||||
|
||||
type SysServiceRecord struct {
|
||||
Id uint `json:"id" form:"id" gorm:"primarykey"`
|
||||
ServiceId int64 `json:"service_id" form:"service_id" gorm:"default:0;type:int;column:service_id;comment:客服id;"`
|
||||
Uid int64 `json:"uid" form:"uid" gorm:"default:0;type:int;column:uid;comment:用户id;"`
|
||||
Avatar string `json:"avatar" form:"avatar" gorm:"default:'';type:varchar(255);column:avatar;comment:用户头像;"`
|
||||
Nickname string `json:"nickname" form:"nickname" gorm:"default:'';type:varchar(255);column:nickname;comment:用户昵称;"`
|
||||
Online uint `json:"online" form:"online" gorm:"default:0;type:tinyint;column:online;comment:是否在线;"`
|
||||
IsTourist uint `json:"is_tourist" form:"is_tourist" gorm:"default:0;type:tinyint;column:is_tourist;comment:是否游客0:否;1:是;"`
|
||||
Message string `json:"message" form:"message" gorm:"type:text;column:message;comment:最新一条消息;"`
|
||||
AddTime int64 `json:"add_time" form:"add_time" gorm:"default:0;type:int;column:add_time;comment:添加时间;"`
|
||||
UpdateTime int64 `json:"update_time" form:"update_time" gorm:"default:0;type:int;column:update_time;comment:更新时间;"`
|
||||
MessageType int64 `json:"message_type" form:"message_type" gorm:"default:0;type:tinyint(1);column:message_type;comment:消息类型:1=文字 2=表情 3=图片 4=语音 5=视频 6=商品;"`
|
||||
NoRead int64 `json:"no_read" gorm:"-"`
|
||||
AddTimeStr string `json:"add_time_str" gorm:"-"`
|
||||
}
|
||||
|
||||
func (SysServiceRecord) TableName() string {
|
||||
return "sys_service_record"
|
||||
}
|
||||
16
plugin/customerservice/model/sysServiceReply.go
Normal file
16
plugin/customerservice/model/sysServiceReply.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
type SysServiceReply struct {
|
||||
Id int64 `json:"id" form:"id" gorm:"primarykey"`
|
||||
ReplyType int64 `json:"reply_type" form:"reply_type" gorm:"default:1;type:int;column:reply_type;comment:回复类型1文本,2图片;"`
|
||||
IsComplete int64 `json:"is_complete" form:"is_complete" gorm:"default:0;type:int;column:is_complete;comment:是否完全匹配0否1是;"`
|
||||
Keyword string `json:"keyword" form:"keyword" gorm:"default:'';type:varchar(255);column:keyword;comment:关键字;"`
|
||||
Content string `json:"content" form:"content" gorm:"type:text;column:content;comment:回复内容;"`
|
||||
AddTime int64 `json:"add_time" form:"add_time" gorm:"default:0;type:int;column:add_time;comment:添加时间;"`
|
||||
AddTimeStr string `json:"add_time_str" form:"add_time_str" gorm:"-"`
|
||||
Status int64 `json:"status" form:"status" gorm:"default:0;type:tinyint(1);column:status;comment:是否显示;"`
|
||||
}
|
||||
|
||||
func (SysServiceReply) TableName() string {
|
||||
return "sys_service_reply"
|
||||
}
|
||||
15
plugin/customerservice/model/sysServiceScript.go
Normal file
15
plugin/customerservice/model/sysServiceScript.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
type SysServiceScript struct {
|
||||
Id int64 `json:"id" form:"id" gorm:"primarykey"`
|
||||
ServiceId int64 `json:"service_id" form:"service_id" gorm:"default:0;type:int;column:service_id;comment:客服id为0说明是公共话术;"`
|
||||
Title string `json:"title" form:"title" gorm:"default:'';type:varchar(255);column:title;comment:话术标题;"`
|
||||
Content string `json:"content" form:"content" gorm:"type:text;column:content;comment:话术内容;"`
|
||||
AddTime int64 `json:"add_time" form:"add_time" gorm:"default:0;type:int;column:add_time;comment:添加时间;"`
|
||||
AddTimeStr string `json:"add_time_str" form:"add_time_str" gorm:"-"`
|
||||
Sort int64 `json:"sort" form:"sort" gorm:"default:0;type:int;column:sort;comment:排序;"`
|
||||
}
|
||||
|
||||
func (SysServiceScript) TableName() string {
|
||||
return "sys_service_script"
|
||||
}
|
||||
11
plugin/customerservice/model/sysTestUser.go
Normal file
11
plugin/customerservice/model/sysTestUser.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
type SysTestUser struct {
|
||||
Id int64 `json:"id" form:"id" gorm:"primarykey"`
|
||||
Avatar string `json:"avatar" form:"avatar" gorm:"default:'';type:varchar(255);column:avatar;comment:头像;"`
|
||||
Nickname string `json:"nickname" form:"nickname" gorm:"default:'';type:varchar(255);column:nickname;comment:昵称;"`
|
||||
}
|
||||
|
||||
func (SysTestUser) TableName() string {
|
||||
return "sys_test_user"
|
||||
}
|
||||
Reference in New Issue
Block a user