update: 更新cast_work表和video_script 表结构

This commit is contained in:
cjy 2026-06-08 16:16:39 +08:00
parent a6a9b9197c
commit 36a6e82fae

View File

@ -1,6 +1,8 @@
package model
import (
"time"
"gorm.io/plugin/soft_delete"
)
@ -155,10 +157,28 @@ func (WorkVideo) TableName() string {
type WorkExtra struct {
WorkUuid string `gorm:"column:work_uuid;type:varchar(50);NOT NULL;index:idx_work_uuid;default:'';comment:作品uuid;primary_key" json:"workUuid"`
ArtistConfirmedTime int64 `gorm:"column:artist_confirmed_time;type:bigint(20);NOT NULL;default:0;comment:艺人确认时间" json:"artistConfirmedTime"`
ScriptUuid string `gorm:"column:script_uuid;type:varchar(50);NOT NULL;default:'';comment:脚本uuid;index:idx_script_uuid" json:"scriptUuid"`
CostType uint32 `gorm:"column:cost_type;type:tinyint(3);NOT NULL;default:1;comment:计费类型 1 套餐 2 增值" json:"costType"`
CreatedAt int `gorm:"column:created_at;type:int(11);autoCreateTime" json:"createdAt"`
UpdatedAt int `gorm:"column:updated_at;type:int(11);autoCreateTime" json:"updatedAt"`
DeletedAt soft_delete.DeletedAt
ScriptInfo string `gorm:"column:script_info;type:varchar(1500);NOT NULL;default:'';comment:脚本数据" json:"scriptInfo"`
PublishStatus uint32 `gorm:"column:publish_status;type:tinyint(3);NOT NULL;default:0;comment:抖音发布状态 0 未发布 1 发布中 2 发布完成 3 发布失败 4 异常" json:"publishStatus"`
//TiktokStatus uint32 `gorm:"column:tiktok_status;type:tinyint(3);NOT NULL;default:0;comment:抖音发布状态 0 未发布 1 发布中 2 发布完成 3 发布失败 4 异常" json:"tiktokStatus"`
//InsStatus uint32 `gorm:"column:ins_status;type:tinyint(3);NOT NULL;default:0;comment:ins发布状态 0 未发布 1 发布中 2 发布完成 3 发布失败 4 异常" json:"insStatus"`
//DmStatus uint32 `gorm:"column:dm_status;type:tinyint(3);NOT NULL;default:0;comment:dm发布状态 0 未发布 1 发布中 2 发布完成 3 发布失败 4 异常" json:"dmStatus"`
//PublishMediaID string `gorm:"column:publish_media_id;type:varchar(100);NOT NULL;default:'';comment:发布媒体ID" json:"publishMediaId"`
ConfirmType uint32 `gorm:"column:confirm_type;type:tinyint(3);NOT NULL;default:0;comment:确认类型 1 艺人确认 2系统确认" json:"confirmType"`
ConfirmFailType uint32 `gorm:"column:confirm_fail_type;type:tinyint(3);NOT NULL;default:0;comment:0 未知 1 余额不足 2 过期" json:"confirmFailType"`
RepublishPlatformIDs string `gorm:"column:republish_platform_ids;type:varchar(100);NOT NULL;default:'';comment:重发平台ID" json:"republishPlatformIds"`
NeedPublishPlatformIDs string `gorm:"column:need_publish_platform_ids;type:varchar(100);NOT NULL;default:'';comment:需要发布的平台ID" json:"needPublishPlatformIds"`
BundleOrderUuid string `gorm:"column:bundle_order_uuid;type:varchar(50);NOT NULL;default:'';comment:套餐订单uuid" json:"bundleOrderUuid"`
OrderNo string `gorm:"column:order_no;type:varchar(50);NOT NULL;default:'';index:idx_order_no;comment:订单号" json:"orderNo"`
OrderStatus uint8 `gorm:"column:order_status;type:tinyint(1);NOT NULL;default:0;comment:订单状态 1:待支付 2:已支付 3:已过期" json:"orderStatus"`
BillingType uint8 `gorm:"column:billing_type;type:tinyint(1);NOT NULL;default:0;comment:计费类型 0:普通视频 1:先用后付视频" json:"billingType"`
TagInfo string `gorm:"column:tag_info;type:varchar(1000);NOT NULL;default:'';comment:话题标签信息JSON格式" json:"tagInfo"`
CreatedAt int `gorm:"column:created_at;type:int(11);autoCreateTime" json:"createdAt"`
UpdatedAt int `gorm:"column:updated_at;type:int(11);autoCreateTime" json:"updatedAt"`
DeletedAt soft_delete.DeletedAt
}
func (WorkExtra) TableName() string {
@ -218,28 +238,56 @@ func (CastWorkAnalysisExtra) TableName() string {
// VideoScript 视频脚本表
type VideoScript struct {
Uuid string `gorm:"column:uuid;type:varchar(50);NOT NULL;primary_key;comment:脚本UUID" json:"uuid"`
Title string `gorm:"column:title;type:varchar(200);NOT NULL;default:'';comment:脚本标题" json:"title"`
Content string `gorm:"column:content;type:varchar(1000);NOT NULL;default:'';comment:脚本内容" json:"content"`
ArtistUuid string `gorm:"column:artist_uuid;type:varchar(50);NOT NULL;default:'';comment:艺人UUID" json:"artistUuid"`
ArtistName string `gorm:"column:artist_name;type:varchar(50);NOT NULL;default:'';comment:艺人名称" json:"artistName"`
ArtistNum string `gorm:"column:artist_num;type:varchar(50);NOT NULL;default:'';comment:艺人编号" json:"artistNum"`
ArtistPhone string `gorm:"column:artist_phone;type:varchar(50);NOT NULL;default:'';comment:艺人手机号" json:"artistPhone"`
CreatorUuid string `gorm:"column:creator_uuid;type:varchar(50);NOT NULL;default:'';comment:创建人UUID" json:"creatorUuid"`
CreatorName string `gorm:"column:creator_name;type:varchar(50);NOT NULL;default:'';comment:创建人名称" json:"creatorName"`
ApprovalID string `gorm:"column:approval_id;type:varchar(50);NOT NULL;default:'';comment:审批ID" json:"approvalId"`
ApprovalReply string `gorm:"column:approval_reply;type:varchar(500);NOT NULL;default:'';comment:审批回复" json:"approvalReply"`
Status uint8 `gorm:"column:status;type:tinyint(1);NOT NULL;default:1;comment:状态 1:草稿 2:审核中 3:审核通过 4:审核不通过" json:"status"`
Remark string `gorm:"column:remark;type:varchar(500);NOT NULL;default:'';comment:备注" json:"remark"`
CreatedAt int `gorm:"column:created_at;type:int(11);autoCreateTime" json:"createdAt"`
UpdatedAt int `gorm:"column:updated_at;type:int(11);autoUpdateTime" json:"updatedAt"`
DeletedAt soft_delete.DeletedAt
Uuid string `gorm:"column:uuid;type:varchar(50);NOT NULL;primary_key;comment:脚本UUID" json:"uuid"`
Title string `gorm:"column:title;type:varchar(200);NOT NULL;default:'';comment:脚本标题" json:"title"`
Content string `gorm:"column:content;type:varchar(1000);NOT NULL;default:'';comment:脚本内容" json:"content"`
ArtistUuid string `gorm:"column:artist_uuid;type:varchar(50);NOT NULL;default:'';comment:艺人UUID" json:"artistUuid"`
ArtistName string `gorm:"column:artist_name;type:varchar(50);NOT NULL;default:'';comment:艺人名称" json:"artistName"`
ArtistNum string `gorm:"column:artist_num;type:varchar(50);NOT NULL;default:'';comment:艺人编号" json:"artistNum"`
ArtistPhone string `gorm:"column:artist_phone;type:varchar(50);NOT NULL;default:'';comment:艺人手机号" json:"artistPhone"`
CreatorUuid string `gorm:"column:creator_uuid;type:varchar(50);NOT NULL;default:'';comment:创建人UUID" json:"creatorUuid"`
CreatorName string `gorm:"column:creator_name;type:varchar(50);NOT NULL;default:'';comment:创建人名称" json:"creatorName"`
ApprovalID string `gorm:"column:approval_id;type:varchar(50);NOT NULL;default:'';comment:审批ID" json:"approvalId"`
ApprovalReply string `gorm:"column:approval_reply;type:varchar(500);NOT NULL;default:'';comment:审批回复" json:"approvalReply"`
ApprovalTime *time.Time `gorm:"column:approval_time;type:datetime;comment:审批时间" json:"approvalTime"`
QuoteCount int `gorm:"column:quote_count;type:int(11);NOT NULL;default:0;comment:引用次数" json:"quoteCount"`
Status uint8 `gorm:"column:status;type:tinyint(1);NOT NULL;default:1;comment:状态 1:草稿 2:审核中 3:审核通过 4:审核不通过" json:"status"`
Remark string `gorm:"column:remark;type:varchar(500);NOT NULL;default:'';comment:备注" json:"remark"`
OrderNo string `gorm:"column:order_no;type:varchar(50);NOT NULL;default:'';index:idx_order_no;comment:订单号" json:"orderNo"`
OrderStatus uint8 `gorm:"column:order_status;type:tinyint(1);NOT NULL;default:0;comment:订单状态 1:待支付 2:已支付 3:已过期" json:"orderStatus"`
BillingType uint8 `gorm:"column:billing_type;type:tinyint(1);NOT NULL;default:0;comment:计费类型 0:普通脚本 1:先用后付脚本" json:"billingType"`
CreatedAt int `gorm:"column:created_at;type:int(11);autoCreateTime" json:"createdAt"`
UpdatedAt int `gorm:"column:updated_at;type:int(11);autoUpdateTime" json:"updatedAt"`
DeletedAt soft_delete.DeletedAt
}
func (VideoScript) TableName() string {
return "cast_video_script"
}
// 脚本状态常量
const (
ScriptStatusDraft = 1 // 草稿
ScriptStatusReviewing = 2 // 审核中
ScriptStatusApproved = 3 // 审核通过
ScriptStatusRejected = 4 // 审核不通过
)
// 订单状态常量
const (
OrderStatusPending = 1 // 待支付
OrderStatusPaid = 2 // 已支付
OrderStatusExpired = 3 // 已过期
)
// 计费类型常量
const (
BillingTypeNormal = 0 // 普通脚本计费
BillingTypeBNPL = 1 // 先用后付脚本计费
)
// 竞品报告表
type CastCompetitiveReport struct {
Uuid string `gorm:"column:uuid;type:varchar(50);NOT NULL;primary_key;" json:"id"`