You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
4.8 KiB
79 lines
4.8 KiB
package model
|
|
|
|
import (
|
|
"bkb-seller/global"
|
|
"time"
|
|
)
|
|
|
|
type Mission struct { //任务
|
|
Title string `gorm:"type:varchar(255);" json:"title"` //标题
|
|
StoreNo string `gorm:"type:varchar(60);" json:"store_no"` // 店铺编号
|
|
GoodsId uint `gorm:"type:int(11)" json:"goods_id"` //关联商品
|
|
GoodsStatus int `gorm:"type:tinyint(1);" json:"goods_status"` //关联商品状态 1:正常 2:已下架
|
|
Num int64 `gorm:"type:int(11)" json:"num"` //商品数量
|
|
HireType int `gorm:"type:tinyint(1)" json:"hire_type"` //佣金类型 1:固定佣金 2:比例抽成
|
|
HireMoney float64 `gorm:"type:decimal(10,2);" json:"hire_money"` //hire_type==1 佣金金额
|
|
HireRatio float64 `gorm:"type:decimal(10,2);" json:"hire_ratio"` //hire_type==2 抽成比例
|
|
StartTime *time.Time `gorm:"column:start_time" json:"start_time"` //任务起始时间
|
|
EndTime *time.Time `gorm:"column:end_time" json:"end_time"` //任务结束时间
|
|
ClaimNum int64 `gorm:"type:int(11);" json:"claim_num"` //接任务人数
|
|
CollectionNum int64 `gorm:"type:int(11)" json:"collection_num"` //收藏人数
|
|
ClaimDays int `gorm:"type:tinyint(11)" json:"claim_days"` //任务完成天数
|
|
ClaimDemands string `gorm:"type:varchar(500);" json:"claim_demands"` //任务拍摄要求
|
|
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
|
|
Status int `gorm:"type:tinyint(1);" json:"status"` //状态 1:未开始 2:进行中 3:已结束
|
|
ClaimStock int64 `json:"claim_stock"` //可接任务库存
|
|
FundLock float64 `gorm:"type:decimal(10,2)" json:"fund_lock"` // 任务锁定营销账户金额
|
|
Sample //样品
|
|
VideoMaterial //视频素材
|
|
Description string `gorm:"type:varchar(2000);" json:"description"` //描述/卖点
|
|
|
|
global.MG_MODEL
|
|
}
|
|
|
|
type MissionDetail struct {
|
|
Title string `json:"title"` //标题
|
|
GoodsId uint `json:"-"` //
|
|
GoodsStatus int `json:"goods_status"` //关联商品状态 1:正常 2:已下架
|
|
Goods TbGoods4List `gorm:"ForeignKey:GoodsId" json:"goods"` //商品信息
|
|
Num int64 `json:"num"` //商品数量
|
|
HireType int `json:"hire_type"` //佣金类型 1:固定佣金 2:比例抽成
|
|
HireMoney float64 `json:"hire_money"` //hire_type==1 佣金金额
|
|
HireRatio float64 `json:"hire_ratio"` //hire_type==2 抽成比例
|
|
HireMoneyExpect string `gorm:"-" json:"hire_money_expect"` //预计佣金描述
|
|
StartTime *time.Time `json:"start_time"` //任务起始时间
|
|
EndTime *time.Time `json:"end_time"` //任务结束时间
|
|
Status int `json:"status"` //状态 1:未开始 2:进行中 3:已结束
|
|
ClaimNum int64 `json:"claim_num"` //接任务人数
|
|
ClaimStock int64 `json:"claim_stock"` //可接任务库存
|
|
OrderNum int64 `gorm:"-" json:"order_num"` //订单数
|
|
ClaimDays int `gorm:"type:tinyint(11)" json:"claim_days"` //任务完成天数
|
|
ClaimDemands string `gorm:"type:varchar(500);" json:"claim_demands"` //任务拍摄要求
|
|
Description string `gorm:"type:varchar(2000);" json:"description"` //描述/卖点
|
|
Sample
|
|
VideoMaterial
|
|
ReleaseCountry string `gorm:"-" json:"release_country"` //发布国家
|
|
ReleaseChannels string `gorm:"-" json:"release_channels"` //发布渠道
|
|
StoreNo string `gorm:"type:varchar(60);" json:"store_no"` // 店铺编号
|
|
global.MG_MODEL
|
|
}
|
|
|
|
type Sample struct {
|
|
HasSample int `gorm:"type:tinyint(1);default:0" json:"has_sample"` //是否有样品 0:没有 1:有
|
|
SampleNum int `gorm:"type:tinyint(11);" json:"sample_num"` //样品数量
|
|
}
|
|
|
|
type VideoMaterial struct {
|
|
HasVideo int `gorm:"type:tinyint(1);default:0" json:"has_video"` //是否有视频素材 0:没有 1:有
|
|
VideoUrl string `json:"video_url"`
|
|
VideoChannelIds string `json:"video_channel_ids"` //视频发布渠道,多个渠道英文逗号连接
|
|
VideoCountryId string `json:"video_country_id"` //视频发布国家
|
|
}
|
|
|
|
func (Mission) TableName() string {
|
|
return "mission"
|
|
}
|
|
|
|
func (MissionDetail) TableName() string {
|
|
return "mission"
|
|
}
|
|
|