Files
iotlcm/server/internal/model/t_wo_main.go
T
MiFaZhan 59eb34976a chore: 初始开源发布
iotlcm-admin-svr:管理后台服务。

- Go module:iotlcm → git.5iot.com/iotlcm-public/iotlcm-admin-svr(729 文件)
- 凭据与地址脱敏:JWT signingKey(含代码里的 MustGet 默认值)、
  MySQL DSN、Redis 口令、告警邮件发件人邮箱全部改为占位;
  私网 IP → 文档地址段;库名 xiujie_admin → iotlcm
- 真实手机号/邮箱 → 合法 11 位编造号 / example.com
- 移除内部资产:CI 触发器、过时 DDL(sql/db_iotlcm.sql)、
  私有依赖 go get 行、明文 registry 登录口令
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- Dockerfile 改用公共基础镜像
- 拼错的 RADEME.md → README.md,README 重写
- 需要真实数据库的用例改为可用 IOTLCM_TEST_WITH_DB=1 显式启用
- 补 Apache-2.0 LICENSE,LF 行尾 + .gitattributes

数据库 schema 不随本仓发布(生产 DDL 已过时),README 已说明。
2026-10-23 14:48:30 +08:00

290 lines
16 KiB
Go

// Package genin
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package model
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/xgorm/hook"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/entity"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/os/gtime"
)
// TWoMainUpdateFields 修改工单主表字段过滤
type TWoMainUpdateFields struct {
WoNo string `json:"woNo" dc:"工单编号"`
WoType int `json:"woType" dc:"工单类型 枚举"`
Title string `json:"title" dc:"工单标题"`
Content string `json:"content" dc:"问题描述"`
Attachment string `json:"attachment" dc:"附件"`
CreatorType int `json:"creatorType" dc:"创建人类型:1终端用户,2代理商,3客服"`
CreatorDeptId int64 `json:"creatorDeptId" dc:"创建人机构ID"`
CreatorUserId int64 `json:"creatorUserId" dc:"创建人用户ID"`
CreatorName string `json:"creatorName" dc:"创建人姓名"`
CurrentStatus int `json:"currentStatus" dc:"当前处理状态:0已分派,1处理中,2待反馈,3已反馈,4待确认,5已确认,6已关闭,7已废除"`
HandlerDeptId int64 `json:"handlerDeptId" dc:"处理方机构ID"`
HandlerUserId int64 `json:"handlerUserId" dc:"处理人用户ID"`
HandlerName string `json:"handlerName" dc:"处理人姓名"`
RelatedType int `json:"relatedType" dc:"关联业务类型:0卡,1套餐,2订单,3系统"`
RelatedId int64 `json:"relatedId" dc:"关联业务ID"`
FirstResponseTime *gtime.Time `json:"firstResponseTime" dc:"首次响应时间"`
ResolveTime *gtime.Time `json:"resolveTime" dc:"解决时间"`
CloseTime *gtime.Time `json:"closeTime" dc:"关闭时间"`
SatisfactionLevel int `json:"satisfactionLevel" dc:"满意度:1-5分"`
EvalContent string `json:"evalContent" dc:"评价内容"`
EvalTime *gtime.Time `json:"evalTime" dc:"评价时间"`
Remark string `json:"remark" dc:"备注"`
TenantId string `json:"tenantId" dc:"租户ID"`
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
// TWoMainInsertFields 新增工单主表字段过滤
type TWoMainInsertFields struct {
WoNo string `json:"woNo" dc:"工单编号"`
WoType int `json:"woType" dc:"工单类型 枚举"`
Title string `json:"title" dc:"工单标题"`
Content string `json:"content" dc:"问题描述"`
Attachment string `json:"attachment" dc:"附件"`
CreatorType int `json:"creatorType" dc:"创建人类型:1终端用户,2代理商,3客服"`
CreatorDeptId int64 `json:"creatorDeptId" dc:"创建人机构ID"`
CreatorUserId int64 `json:"creatorUserId" dc:"创建人用户ID"`
CreatorName string `json:"creatorName" dc:"创建人姓名"`
CreatorPhone string `json:"creatorPhone" dc:"创建人手机号"`
CurrentStatus int `json:"currentStatus" dc:"当前处理状态:0已分派,1处理中,2待反馈,3已反馈,4待确认,5已确认,6已关闭,7已废除"`
HandlerDeptId int64 `json:"handlerDeptId" dc:"处理方机构ID"`
HandlerUserId int64 `json:"handlerUserId" dc:"处理人用户ID"`
HandlerName string `json:"handlerName" dc:"处理人姓名"`
RelatedType int `json:"relatedType" dc:"关联业务类型:0卡,1套餐,2订单,3系统"`
RelatedId int64 `json:"relatedId" dc:"关联业务ID"`
FirstResponseTime *gtime.Time `json:"firstResponseTime" dc:"首次响应时间"`
ResolveTime *gtime.Time `json:"resolveTime" dc:"解决时间"`
CloseTime *gtime.Time `json:"closeTime" dc:"关闭时间"`
SatisfactionLevel int `json:"satisfactionLevel" dc:"满意度:1-5分"`
EvalContent string `json:"evalContent" dc:"评价内容"`
EvalTime *gtime.Time `json:"evalTime" dc:"评价时间"`
Remark string `json:"remark" dc:"备注"`
TenantId string `json:"tenantId" dc:"租户ID"`
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
CreatedBy int64 `json:"createdBy" dc:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
}
// TWoMainEditParam 修改/新增工单主表
type TWoMainEditParam struct {
//entity.TWoMain
Id int64 `json:"id" dc:"主键ID"`
WoNo *string `json:"woNo" dc:"工单编号"`
WoType *int `json:"woType" dc:"工单类型 枚举"`
Title *string `json:"title" dc:"工单标题"`
Content *string `json:"content" dc:"问题描述"`
File *ghttp.UploadFile `json:"file" dc:"工单附件文件"`
Attachment *string `json:"attachment" dc:"附件"`
AttachmentUrls []string `json:"attachmentUrls" dc:"附件URL列表"`
CreatorType *int `json:"creatorType" dc:"创建人类型:1终端用户,2代理商,3客服"`
CreatorDeptId *int64 `json:"creatorDeptId" dc:"创建人机构ID"`
CreatorUserId *int64 `json:"creatorUserId" dc:"创建人用户ID"`
CreatorName *string `json:"creatorName" dc:"创建人姓名"`
CreatorPhone *string `json:"creatorPhone" dc:"创建人手机号"`
CurrentStatus *int `json:"currentStatus" dc:"当前处理状态:0已分派,1处理中,2待反馈,3已反馈,4待确认,5已确认,6已关闭,7已废除"`
AssignDeptId *int64 `json:"assignDeptId" dc:"分派机构ID"`
AssignUserId *int64 `json:"assignUserId" dc:"分派人用户ID"`
HandlerDeptId *int64 `json:"handlerDeptId" dc:"处理方机构ID"`
HandlerUserId *int64 `json:"handlerUserId" dc:"处理人用户ID"`
HandlerName *string `json:"handlerName" dc:"处理人姓名"`
RelatedType *int `json:"relatedType" dc:"关联业务类型:0卡,1套餐,2订单,3系统"`
RelatedId *int64 `json:"relatedId" dc:"关联业务ID"`
FirstResponseTime *gtime.Time `json:"firstResponseTime" dc:"首次响应时间"`
ResolveTime *gtime.Time `json:"resolveTime" dc:"解决时间"`
CloseTime *gtime.Time `json:"closeTime" dc:"关闭时间"`
SatisfactionLevel *int `json:"satisfactionLevel" dc:"满意度:1-5分"`
EvalContent *string `json:"evalContent" dc:"评价内容"`
EvalTime *gtime.Time `json:"evalTime" dc:"评价时间"`
Remark *string `json:"remark" dc:"备注"`
TenantId *string `json:"tenantId" dc:"租户ID"`
CreatedDept *int64 `json:"createdDept" dc:"创建部门"`
CreatedBy *int64 `json:"createdBy" dc:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedBy *int64 `json:"updatedBy" dc:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
func (in *TWoMainEditParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainEditModel struct{}
type TWoMainMessageParam struct {
WoNo string `json:"woNo" v:"required#工单编号不能为空" dc:"工单编号"`
CommType int `json:"commType" dc:"沟通类型:0回复,1反馈"`
Content string `json:"content" v:"required#内容不能为空" dc:"内容"`
File *ghttp.UploadFile `json:"file" dc:"附件文件"`
AttachmentUrls []string `json:"attachmentUrls" dc:"附件URL列表"`
}
func (in *TWoMainMessageParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainMessageModel struct{}
type TWoMainTransferParam struct {
WoNo string `json:"woNo" v:"required#工单编号不能为空" dc:"工单编号"`
}
func (in *TWoMainTransferParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainTransferModel struct{}
type TWoMainResolveParam struct {
WoNo string `json:"woNo" v:"required#工单编号不能为空" dc:"工单编号"`
}
func (in *TWoMainResolveParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainResolveModel struct{}
type TWoMainCancelParam struct {
WoNo string `json:"woNo" v:"required#工单编号不能为空" dc:"工单编号"`
}
func (in *TWoMainCancelParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainCancelModel struct{}
type TWoMainCloseParam struct {
WoNo string `json:"woNo" v:"required#工单编号不能为空" dc:"工单编号"`
}
func (in *TWoMainCloseParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainCloseModel struct{}
type TWoMainEvaluateParam struct {
WoNo string `json:"woNo" v:"required#工单编号不能为空" dc:"工单编号"`
SatisfactionLevel int `json:"satisfactionLevel" v:"required#满意度不能为空" dc:"满意度:1-5分"`
EvalContent string `json:"evalContent" dc:"评价内容"`
}
func (in *TWoMainEvaluateParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainEvaluateModel struct{}
// TWoMainDeleteParam 删除工单主表
type TWoMainDeleteParam struct {
Id interface{} `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
}
func (in *TWoMainDeleteParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainDeleteModel struct{}
// TWoMainViewParam 获取指定工单主表信息
type TWoMainViewParam struct {
Id int64 `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
}
func (in *TWoMainViewParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainViewModel struct {
entity.TWoMain
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
}
// TWoMainListParam 获取工单主表列表
type TWoMainListParam struct {
request.PageInfo
Id int64 `json:"id" dc:"主键ID"`
CurrentStatus int `json:"currentStatus" dc:"当前处理状态:0已分派,1处理中,2待反馈,3已反馈,4待确认,5已确认,6已关闭,7已废除"`
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
WoNo string `json:"woNo" dc:"工单编号"`
WoType int `json:"woType" dc:"工单类型 枚举"`
}
func (in *TWoMainListParam) Filter(ctx context.Context) (err error) {
return
}
type TWoMainListModel struct {
Id int64 `json:"id" dc:"主键ID"`
WoNo string `json:"woNo" dc:"工单编号"`
WoType int `json:"woType" dc:"工单类型 枚举"`
Title string `json:"title" dc:"工单标题"`
Attachment string `json:"attachment" dc:"附件"`
CreatorType int `json:"creatorType" dc:"创建人类型:1终端用户,2代理商,3客服"`
CreatorDeptId int64 `json:"creatorDeptId" dc:"创建人机构ID"`
CreatorUserId int64 `json:"creatorUserId" dc:"创建人用户ID"`
CreatorName string `json:"creatorName" dc:"创建人姓名"`
CurrentStatus int `json:"currentStatus" dc:"当前处理状态:0已分派,1处理中,2待反馈,3已反馈,4待确认,5已确认,6已关闭,7已废除"`
HandlerDeptId int64 `json:"handlerDeptId" dc:"处理方机构ID"`
HandlerUserId int64 `json:"handlerUserId" dc:"处理人用户ID"`
HandlerName string `json:"handlerName" dc:"处理人姓名"`
RelatedType int `json:"relatedType" dc:"关联业务类型:0卡,1套餐,2订单,3系统"`
RelatedId int64 `json:"relatedId" dc:"关联业务ID"`
FirstResponseTime *gtime.Time `json:"firstResponseTime" dc:"首次响应时间"`
ResolveTime *gtime.Time `json:"resolveTime" dc:"解决时间"`
CloseTime *gtime.Time `json:"closeTime" dc:"关闭时间"`
SatisfactionLevel int `json:"satisfactionLevel" dc:"满意度:1-5分"`
EvalTime *gtime.Time `json:"evalTime" dc:"评价时间"`
TenantId string `json:"tenantId" dc:"租户ID"`
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
CreatedBy int64 `json:"createdBy" dc:"创建者"`
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
// TWoMainExportModel 导出工单主表
type TWoMainExportModel struct {
Id int64 `json:"id" dc:"主键ID"`
WoNo string `json:"woNo" dc:"工单编号"`
WoType int `json:"woType" dc:"工单类型 枚举"`
Title string `json:"title" dc:"工单标题"`
CreatorType int `json:"creatorType" dc:"创建人类型:1终端用户,2代理商,3客服"`
CreatorDeptId int64 `json:"creatorDeptId" dc:"创建人机构ID"`
CreatorUserId int64 `json:"creatorUserId" dc:"创建人用户ID"`
CreatorName string `json:"creatorName" dc:"创建人姓名"`
CurrentStatus int `json:"currentStatus" dc:"当前处理状态:0已分派,1处理中,2待反馈,3已反馈,4待确认,5已确认,6已关闭,7已废除"`
HandlerDeptId int64 `json:"handlerDeptId" dc:"处理方机构ID"`
HandlerUserId int64 `json:"handlerUserId" dc:"处理人用户ID"`
HandlerName string `json:"handlerName" dc:"处理人姓名"`
RelatedType int `json:"relatedType" dc:"关联业务类型:0卡,1套餐,2订单,3系统"`
RelatedId int64 `json:"relatedId" dc:"关联业务ID"`
FirstResponseTime *gtime.Time `json:"firstResponseTime" dc:"首次响应时间"`
ResolveTime *gtime.Time `json:"resolveTime" dc:"解决时间"`
CloseTime *gtime.Time `json:"closeTime" dc:"关闭时间"`
SatisfactionLevel int `json:"satisfactionLevel" dc:"满意度:1-5分"`
EvalTime *gtime.Time `json:"evalTime" dc:"评价时间"`
TenantId string `json:"tenantId" dc:"租户ID"`
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
CreatedBy int64 `json:"createdBy" dc:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}