project.go 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package gorm_model
  2. import (
  3. "time"
  4. )
  5. type ProjectInfo struct {
  6. ProjectID string `gorm:"column:project_id;primary_key;"` // 项目id 项目ID生成规则:年(2位)+一年中的第几天(3位)+5位数随机数,雪花算法也可,生成10位订单号
  7. ProjectName string `gorm:"column:project_name"` // 项目名称
  8. ProjectStatus int64 `gorm:"column:project_status"` // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
  9. ProjectType int64 `gorm:"column:project_type"` // 项目类型,1代表全流程项目,2代表专项项目
  10. ProjectPlatform int64 `gorm:"column:project_platform"` // 项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎
  11. ProjectForm int64 `gorm:"column:project_form"` // 项目形式,1-3分别代表商品寄拍、素材分发、虚拟产品测评
  12. TalentType string `gorm:"column:talent_type"` // 达人类型
  13. RecruitDdl *time.Time `gorm:"column:recruit_ddl"` // 招募截止时间
  14. ContentType int64 `gorm:"column:content_type"` // 内容形式,1代表图文,2代表视频
  15. ProjectDetail string `gorm:"column:project_detail"` // 项目详情
  16. ApplyNum int64 `gorm:"column:apply_num;default:0;NOT NULL"` // 报名人数
  17. RecruitNum int64 `gorm:"column:recruit_num;default:0;NOT NULL"` // 已招募人数
  18. EnterpriseID string `gorm:"column:enterprise_id"` // 所属企业id
  19. ProductID int64 `gorm:"column:product_id"` // 关联商品id
  20. CreatedAt *time.Time `gorm:"column:created_at"` // 创建时间
  21. UpdatedAt *time.Time `gorm:"column:updated_at"` // 修改时间
  22. FeeForm string `gorm:"column:fee_form"` // 稿费形式列表
  23. AutoFailAt *time.Time `gorm:"column:auto_fail_at"` // 失效自动处理时间
  24. AutoTaskID int64 `gorm:"column:auto_task_id;NOT NULL"` // 定时任务id
  25. AutoDefaultID int64 `gorm:"column:auto_default_id;NOT NULL"` // 违约状态id
  26. PaymentAmount float64 `gorm:"column:payment_amount"` // 支付金额
  27. PayAt *time.Time `gorm:"column:pay_at"` // 支付时间
  28. AutoScriptBreakAt *time.Time `gorm:"column:auto_script_break_at"` // 脚本违约自动处理时间
  29. AutoSketchBreakAt *time.Time `gorm:"column:auto_sketch_break_at"` // 初稿违约自动处理时间
  30. FailReason int64 `gorm:"column:fail_reason"` // 失效原因,1、2分别表示逾期未支付、项目存在风险
  31. PassAt *time.Time `gorm:"column:pass_at"` // 审核通过时间
  32. FinishAt *time.Time `gorm:"column:finish_at"` // 结案时间
  33. SubmitAt *time.Time `gorm:"column:submit_at"` // 结案时间
  34. EstimatedCost float64 `gorm:"column:estimated_cost"` // 预估成本
  35. IsRead int64 `gorm:"column:is_read"` // 是否已读
  36. SettlementAmount float64 `gorm:"column:settlement_amount"` // 结算金额
  37. ProductSnap string `gorm:"column:product_snap"` // 商品信息快照
  38. ProductPhotoSnap string `gorm:"column:product_photo_snap"` // 商品图片快照
  39. ServiceChargeRate float64 `gorm:"column:service_charge_rate"` // 服务费率%
  40. OperatorType int `gorm:"column:operator_type"` // 创建者类型,1商家主账号,2商家子账号
  41. SubAccountId int `gorm:"column:sub_account_id"` // 子账号ID
  42. Tools string `gorm:"column:tools"` // 工具
  43. }
  44. func (m *ProjectInfo) TableName() string {
  45. return "project_info"
  46. }