排班管理、主播管理、直播账号管理

This commit is contained in:
2026-04-17 16:28:31 +08:00
commit adb6da1d70
24 changed files with 1861 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package data
import (
"gitea.com/red-future/common/beans"
)
// Anchor 主播实体
type Anchor struct {
beans.SQLBaseDO `orm:",inherit"`
Name string `orm:"name" json:"name" description:"主播姓名"`
Phone string `orm:"phone" json:"phone" description:"联系电话"`
Code string `orm:"code" json:"code" description:"工号"`
Status int `orm:"status" json:"status" description:"状态0停用 1正常"`
Remark string `orm:"remark" json:"remark" description:"备注"`
}
// AnchorCol 主播表字段定义
type AnchorCol struct {
beans.SQLBaseCol
Name string
Phone string
Code string
Status string
Remark string
}
// AnchorCols 主播表字段常量
var AnchorCols = AnchorCol{
SQLBaseCol: beans.DefSQLBaseCol,
Name: "name",
Phone: "phone",
Code: "code",
Status: "status",
Remark: "remark",
}

View File

@@ -0,0 +1,35 @@
package data
import (
"gitea.com/red-future/common/beans"
)
// LiveAccount 直播账号实体
type LiveAccount struct {
beans.SQLBaseDO `orm:",inherit"`
Platform string `orm:"platform" json:"platform" description:"直播平台(抖音/快手/淘宝等)"`
AccountName string `orm:"account_name" json:"accountName" description:"账号名称"`
AccountId string `orm:"account_id" json:"accountId" description:"账号ID"`
Status int `orm:"status" json:"status" description:"状态0停用 1正常"`
Remark string `orm:"remark" json:"remark" description:"备注"`
}
// LiveAccountCol 直播账号表字段定义
type LiveAccountCol struct {
beans.SQLBaseCol
Platform string
AccountName string
AccountId string
Status string
Remark string
}
// LiveAccountCols 直播账号表字段常量
var LiveAccountCols = LiveAccountCol{
SQLBaseCol: beans.DefSQLBaseCol,
Platform: "platform",
AccountName: "account_name",
AccountId: "account_id",
Status: "status",
Remark: "remark",
}

View File

@@ -0,0 +1,46 @@
package data
import (
"time"
"gitea.com/red-future/common/beans"
)
// Schedule 排班实体
type Schedule struct {
beans.SQLBaseDO `orm:",inherit"`
AnchorId int `orm:"anchor_id" json:"anchorId" description:"主播ID"`
AccountId int `orm:"account_id" json:"accountId" description:"直播账号ID"`
StartTime time.Time `orm:"start_time" json:"startTime" description:"开始时间"`
EndTime time.Time `orm:"end_time" json:"endTime" description:"结束时间"`
Status int `orm:"status" json:"status" description:"状态0待直播 1直播中 2已结束 3已取消"`
ProductId int64 `orm:"product_id" json:"productId" description:"商品ID"`
OrderId int64 `orm:"order_id" json:"orderId" description:"订单ID"`
Remark string `orm:"remark" json:"remark" description:"备注"`
}
// ScheduleCol 排班表字段定义
type ScheduleCol struct {
beans.SQLBaseCol
AnchorId string
AccountId string
StartTime string
EndTime string
Status string
ProductId string
OrderId string
Remark string
}
// ScheduleCols 排班表字段常量
var ScheduleCols = ScheduleCol{
SQLBaseCol: beans.DefSQLBaseCol,
AnchorId: "anchor_id",
AccountId: "account_id",
StartTime: "start_time",
EndTime: "end_time",
Status: "status",
ProductId: "product_id",
OrderId: "order_id",
Remark: "remark",
}