63 lines
5.7 KiB
Go
63 lines
5.7 KiB
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"gorm.io/plugin/soft_delete"
|
||
|
)
|
||
|
|
||
|
type TaskManagement struct {
|
||
|
ID int64 `gorm:"primarykey"`
|
||
|
SubNum string `gorm:"column:sub_num;comment:用户编号;index:idx_sub_num;index:idx_sub_tel,priority:1" json:"subNum"`
|
||
|
TelNum string `gorm:"column:tel_num;comment:手机号;index:idx_tel_num;index:idx_sub_tel,priority:2" json:"telNum"`
|
||
|
ArtistName string `gorm:"column:artist_name;comment:艺人名称;index:idx_artist_name" json:"artistName"`
|
||
|
PendingVideoCount int `gorm:"column:pending_video_count;comment:待发视频数量;index:idx_pending_video" json:"pendingVideoCount"`
|
||
|
PendingPostCount int `gorm:"column:pending_post_count;comment:待发图文数量" json:"pendingPostCount"`
|
||
|
PendingDataCount int `gorm:"column:pending_data_count;comment:待发数据数量" json:"pendingDataCount"`
|
||
|
LastTaskAssignee string `gorm:"column:last_task_assignee;comment:最后一次的任务指派人" json:"lastTaskAssignee"`
|
||
|
TaskAssigneeNum string `gorm:"column:task_assignee_num;comment:任务指派人账号" json:"taskAssigneeNum"`
|
||
|
ProgressCount int `gorm:"column:progress_count;comment:进行中的任务数量" json:"progressCount"`
|
||
|
CompleteCount int `gorm:"column:complete_count;comment:已完成的任务数量" json:"completeCount"`
|
||
|
CreatedAt time.Time `gorm:"column:created_at;comment:创建时间" json:"createdAt"`
|
||
|
UpdatedAt time.Time `gorm:"column:updated_at;comment:更新时间" json:"updatedAt"`
|
||
|
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:int(11);index:idx_deleted_at" json:"deletedAt"`
|
||
|
}
|
||
|
|
||
|
func (t *TaskManagement) TableName() string {
|
||
|
return "task_management"
|
||
|
}
|
||
|
|
||
|
// 指派记录表
|
||
|
type TaskAssignRecords struct {
|
||
|
ID int64 `gorm:"primarykey"`
|
||
|
AssignRecordsUUID string `gorm:"column:assign_records_uuid;comment:指派记录UUID;uniqueIndex:idx_assign_uuid" json:"assignRecordsUUID"`
|
||
|
SubNum string `gorm:"column:sub_num;comment:艺人编号;index:idx_assign_sub_num;index:idx_assign_sub_tel,priority:1" json:"subNum"`
|
||
|
TelNum string `gorm:"column:tel_num;comment:艺人手机号;index:idx_assign_tel_num;index:idx_assign_sub_tel,priority:2" json:"telNum"`
|
||
|
ArtistName string `gorm:"column:artist_name;comment:艺人名称;index:idx_assign_artist_name" json:"artistName"`
|
||
|
Status int `gorm:"column:status;comment:反馈完成状态 1:未完成 2:完成;index:idx_status;index:idx_status_assignee,priority:1" json:"status"`
|
||
|
ActualStatus int `gorm:"column:actual_status;comment:实际完成状态 1:未完成 2:完成;index:idx_actual_status;index:idx_actual_assignee,priority:1" json:"actualStatus"`
|
||
|
CompleteTime *time.Time `gorm:"column:complete_time;comment:反馈完成时间;index:idx_complete_time" json:"completeTime"`
|
||
|
OperatorType int `gorm:"column:operator_type;comment:操作类型 1:修改待发数量 2:指派;index:idx_operator_type;index:idx_operator_type_time,priority:1" json:"operatorType"`
|
||
|
Operator string `gorm:"column:operator;comment:操作人;index:idx_operator" json:"operator"`
|
||
|
OperatorNum string `gorm:"column:operator_num;comment:操作人账号;index:idx_operator_num" json:"operatorNum"`
|
||
|
OperatorTime time.Time `gorm:"column:operator_time;comment:操作时间;index:idx_operator_time;index:idx_operator_type_time,priority:2" json:"operatorTime"`
|
||
|
TaskAssignee string `gorm:"column:task_assignee;comment:任务指派人;index:idx_task_assignee;index:idx_status_assignee,priority:2;index:idx_actual_assignee,priority:2" json:"taskAssignee"`
|
||
|
TaskAssigneeNum string `gorm:"column:task_assignee_num;comment:任务指派人账号;index:idx_task_assignee_num" json:"taskAssigneeNum"`
|
||
|
PendingVideoCount int `gorm:"column:pending_video_count;comment:待发视频数量" json:"pendingVideoCount"`
|
||
|
PendingPostCount int `gorm:"column:pending_post_count;comment:待发图文数量" json:"pendingPostCount"`
|
||
|
PendingDataCount int `gorm:"column:pending_data_count;comment:待发数据数量" json:"pendingDataCount"`
|
||
|
AssignVideoCount int `gorm:"column:assign_video_count;comment:指派待发视频数" json:"assignVideoCount"`
|
||
|
AssignPostCount int `gorm:"column:assign_post_count;comment:指派待发图文数" json:"assignPostCount"`
|
||
|
AssignDataCount int `gorm:"column:assign_data_count;comment:指派待发数据数" json:"assignDataCount"`
|
||
|
CompleteVideoCount int `gorm:"column:complete_video_count;comment:已完成视频数" json:"completeVideoCount"`
|
||
|
CompletePostCount int `gorm:"column:complete_post_count;comment:已完成图文数" json:"completePostCount"`
|
||
|
CompleteDataCount int `gorm:"column:complete_data_count;comment:已完成数据数" json:"completeDataCount"`
|
||
|
CreatedAt time.Time `gorm:"column:created_at;comment:创建时间" json:"createdAt"`
|
||
|
UpdatedAt time.Time `gorm:"column:updated_at;comment:更新时间;index:idx_updated_at" json:"updatedAt"`
|
||
|
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:int(11);index:idx_assign_deleted_at" json:"deletedAt"`
|
||
|
}
|
||
|
|
||
|
func (t *TaskAssignRecords) TableName() string {
|
||
|
return "task_assign_records"
|
||
|
}
|