local_info.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. package youngee_talent_model
  2. import (
  3. "github.com/gogf/gf/os/gtime"
  4. "github.com/gogf/gf/util/gmeta"
  5. )
  6. type YounggeeLocalLifeInfo struct {
  7. gmeta.Meta `orm:"table:younggee_local_life_info"`
  8. Id int `json:"id"` // 本地生活表主键ID
  9. LocalId string `json:"local_id"` // 项目id
  10. LocalType int `json:"local_type"` // 项目类型,1代表全流程项目,2代表专项项目
  11. LocalPlatform int `json:"local_platform"` // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
  12. ServiceChargeRate float64 `json:"service_charge_rate"` // 公开服务费率
  13. StoreId int `json:"store_id"` // 关联门店id
  14. StoreRelatedAt *gtime.Time `json:"store_related_at"` // 关联门店时间
  15. TeamBuyingId int `json:"team_buying_id"` // 关联团购id
  16. TeamBuyingRelatedAt *gtime.Time `json:"team_buying_related_at"` // 关联团购时间
  17. PromoteBody int `json:"promote_body"` // 推广主体(1门店 2团购)
  18. Donate int `json:"donate"` // 赠送达人套餐(1有赠送 2无赠送)
  19. LocalName string `json:"local_name"` // 任务标题
  20. TalentType string `json:"talent_type"` // 达人类型(,分隔)
  21. RecruitDdl *gtime.Time `json:"recruit_ddl"` // 招募截止时间
  22. TaskForm int `json:"task_form"` // 任务形式,1-3分别代表商品寄拍、素材分发、虚拟产品测评
  23. ContentType int `json:"content_type"` // 内容形式,1代表图文,2代表视频
  24. TaskDetail string `json:"task_detail"` // 任务详情
  25. TaskStatus int `json:"task_status"` // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、执行中、失效、已结案
  26. EnterpriseId string `json:"enterprise_id"` // 所属企业id
  27. SubAccountId int `json:"sub_account_id"` // 子账号id
  28. OperatorType int `json:"operator_type"` // 创建者类型,1商家主账号,2商家子账号
  29. ApplyNum int `json:"apply_num"` // 报名人数
  30. RecruitNum int `json:"recruit_num"` // 已招募人数
  31. CreatedAt *gtime.Time `json:"created_at"` // 创建时间
  32. UpdatedAt *gtime.Time `json:"updated_at"` // 修改时间
  33. AutoFailAt *gtime.Time `json:"auto_fail_at"` // 失效自动处理时间
  34. AutoTaskId int `json:"auto_task_id"` // 定时任务id
  35. AutoDefaultId int `json:"auto_default_id"` // 违约状态id
  36. PaymentAmount float32 `json:"payment_amount"` // 支付金额
  37. PayAt *gtime.Time `json:"pay_at"` // 支付时间
  38. SubmitAt *gtime.Time `json:"submit_at"` // 提交审核时间
  39. PassAt *gtime.Time `json:"pass_at"` // 审核通过时间
  40. FinishAt *gtime.Time `json:"finish_at"` // 结案时间
  41. EstimatedCost float64 `json:"estimated_cost"` // 预估成本
  42. SettlementAmount float64 `json:"settlement_amount"` // 结算金额
  43. TotalRecruitNum int `json:"total_recruit_num"` // 此任务各策略招募人数总和
  44. Tools string `json:"tools"` // 工具选择,1邀约招募 2样品物流 3审稿工具 4作品审查 5数据巡检 6结算账单(,分隔)
  45. InvoiceStatus int `json:"invoice_status"` // 开票状态(1开票中 2已开票)
  46. YounggeeStore *YounggeeStore `orm:"with:store_id=store_id"` //关联门店
  47. YounggeeProductPhoto []*YounggeeProductPhoto `orm:"with:store_id=store_id"`
  48. RecruitStrategys []*RecruitStrategy `orm:"with:project_id=local_id"`
  49. Enterprise *Enterprise `orm:"with:enterprise_id=enterprise_id"`
  50. WatchNum int `json:"watch_num"`
  51. MinFollowers int `json:"min_followers"`
  52. MaxFollowers int `json:"max_followers"`
  53. IsShowOffer int `json:"is_show_offer"`
  54. HaveSelfOffer int `json:"have_self_offer"`
  55. MaxOffer float64 `json:"max_offer"`
  56. MinOffer float64 `json:"min_offer"`
  57. }
  58. // 服务商接手的项目信息
  59. //
  60. // type LocalInfoSupplier struct {
  61. // gmeta.Meta `orm:"table:younggee_s_local_life_info"`
  62. // SProjectID int `orm:"s_project_id" json:"s_project_id"` // 服务商种草任务ID
  63. // ProjectID string `orm:"project_id" json:"project_id"` // 被服务商加入商单的原种草任务ID
  64. // ProjectStatus int8 `orm:"project_status" json:"project_status"` // 项目状态
  65. // ProjectType int8 `orm:"project_type" json:"project_type"` // 种草任务类型
  66. // ProjectName string `orm:"project_name" json:"project_name"` // 种草任务名称
  67. // ProjectPlatform int8 `orm:"project_platform" json:"project_platform"` // 种草任务平台
  68. // ProjectForm int8 `orm:"project_form" json:"project_form"` // 任务形式
  69. // ContentType int8 `orm:"content_type" json:"content_type"` // 内容形式
  70. // ShareCode string `orm:"share_code" json:"share_code"` // 分享码URL
  71. // SupplierID int `orm:"supplier_id" json:"supplier_id"` // 服务商ID
  72. // EnterpriseID string `orm:"enterprise_id" json:"enterprise_id"` // 所属企业ID
  73. // ApplyNum int `orm:"apply_num" json:"apply_num"` // 报名人数
  74. // RecruitNum int `orm:"recruit_num" json:"recruit_num"` // 已招募人数
  75. // SettleNum int `orm:"settle_num" json:"settle_num"` // 已结算人数
  76. // SubAccountID int `orm:"sub_account_id" json:"sub_account_id"` // 服务商子账号ID
  77. // ServiceCharge float64 `orm:"service_charge" json:"service_charge"` // 服务商预估可赚服务费
  78. // ServiceChargeActual float64 `orm:"service_charge_actual" json:"service_charge_actual"` // 服务商实际可赚服务费
  79. // OperatorType int `orm:"operator_type" json:"operator_type"`
  80. // }
  81. //
  82. // 服务商接手的项目信息
  83. type LocalInfoSupplier struct {
  84. gmeta.Meta `orm:"table:younggee_s_local_life_info"`
  85. SLocalID int `orm:"s_local_id" json:"s_local_id"` // 主键ID
  86. LocalID string `orm:"local_id" json:"local_id"` // 被加入商单的原本地生活ID
  87. LocalType int8 `orm:"local_type" json:"local_type"` // 类型,1代表公开,2代表定向
  88. LocalName string `orm:"local_name" json:"local_name"` // 名称
  89. LocalPlatform int8 `orm:"local_platform" json:"local_platform"` // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
  90. StoreID int `orm:"store_id" json:"store_id"` // 门店ID
  91. TeamBuyingID int `orm:"team_buying_id" json:"team_buying_id"` // 关联团购id
  92. TaskForm int8 `orm:"task_form" json:"task_form"` // 任务形式,1-2分别代表线下探店,素材分发
  93. ContentType int8 `orm:"content_type" json:"content_type"` // 内容形式,1代表图文,2代表视频
  94. TaskStatus int8 `orm:"task_status" json:"task_status"` // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、执行中、失效、已结案
  95. EnterpriseID string `orm:"enterprise_id" json:"enterprise_id"` // 商家ID
  96. SupplierID int `orm:"supplier_id" json:"supplier_id"` // 服务商ID
  97. ApplyNum int `orm:"apply_num" json:"apply_num"` // 报名人数
  98. RecruitNum int `orm:"recruit_num" json:"recruit_num"` // 已招募人数
  99. SettleNum int `orm:"settle_num" json:"settle_num"` // 已结算人数
  100. SubAccountID int `orm:"sub_account_id" json:"sub_account_id"` // 服务商子账号ID
  101. ServiceCharge float64 `orm:"service_charge" json:"service_charge"` // 服务商预估可赚服务费
  102. ServiceChargeActual float64 `orm:"service_charge_actual" json:"service_charge_actual"` // 服务商实际可赚服务费
  103. ServiceChargeSettle float64 `orm:"service_charge_settle" json:"service_charge_settle"` // 服务商已结算服务费
  104. EstimateDraftFee float64 `orm:"estimate_draft_fee" json:"estimate_draft_fee"` // 预估达人总稿费
  105. EstimateSupportFee float64 `orm:"estimate_support_fee" json:"estimate_support_fee"` // 预估提报价格总额
  106. OperatorType int `orm:"operator_type" json:"operator_type"` // 添加商单操作人类型,1为服务商主账号,2为服务商子账号
  107. SLocalStatus int `orm:"s_local_status" json:"s_local_status"` // 服务商本地生活任务状态,1待确认,2已确认,3已拒绝
  108. StrategyStatus int `orm:"strategy_status" json:"strategy_status"` // 定向本地生活任务是否替换招募策略,1是,2否
  109. BOperator string `orm:"b_operator" json:"b_operator"` // 商家发起入库邀约人
  110. BOperatorType int `orm:"b_operator_type" json:"b_operator_type"` // 商家发起入库邀约人类型:1主账号 2子账号
  111. CreateTime *gtime.Time `orm:"create_time" json:"create_time"` // 创建时间
  112. CreateStrategyID int `orm:"create_strategy_id" json:"create_strategy_id"` // 服务商替换招募策略操作人ID
  113. CreateStrategyType int `orm:"create_strategy_type" json:"create_strategy_type"` // 服务商替换招募策略操作人类型:1服务商主账号,2子账号
  114. ShareCode string `orm:"share_code" json:"share_code"` // 分享码url
  115. FinishTime *gtime.Time `orm:"finish_time" json:"finish_time"` // 结案时间
  116. SupplierType int `orm:"supplier_type" json:"supplier_type"` // 服务商类型,1个人,2企业
  117. }
  118. type LocalInfoDetail struct {
  119. gmeta.Meta `orm:"table:younggee_local_life_info"`
  120. Id int `json:"id"` // 本地生活表主键ID
  121. LocalId string `json:"local_id"` // 项目id
  122. LocalType int `json:"local_type"` // 项目类型,1代表全流程项目,2代表专项项目
  123. LocalPlatform int `json:"local_platform"` // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
  124. ServiceChargeRate float64 `json:"service_charge_rate"` // 公开服务费率
  125. StoreId int `json:"store_id"` // 关联门店id
  126. StoreRelatedAt *gtime.Time `json:"store_related_at"` // 关联门店时间
  127. TeamBuyingId int `json:"team_buying_id"` // 关联团购id
  128. TeamBuyingRelatedAt *gtime.Time `json:"team_buying_related_at"` // 关联团购时间
  129. PromoteBody int `json:"promote_body"` // 推广主体(1门店 2团购)
  130. Donate int `json:"donate"` // 赠送达人套餐(1有赠送 2无赠送)
  131. LocalName string `json:"local_name"` // 任务标题
  132. TalentType string `json:"talent_type"` // 达人类型(,分隔)
  133. RecruitDdl *gtime.Time `json:"recruit_ddl"` // 招募截止时间
  134. TaskForm int `json:"task_form"` // '任务形式,1-2分别代表线下探店,素材分发',
  135. ContentType int `json:"content_type"` // 内容形式,1代表图文,2代表视频
  136. TaskDetail string `json:"task_detail"` // 任务详情
  137. TaskStatus int `json:"task_status"` // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、执行中、失效、已结案
  138. EnterpriseId string `json:"enterprise_id"` // 所属企业id
  139. SubAccountId int `json:"sub_account_id"` // 子账号id
  140. OperatorType int `json:"operator_type"` // 创建者类型,1商家主账号,2商家子账号
  141. ApplyNum int `json:"apply_num"` // 报名人数
  142. RecruitNum int `json:"recruit_num"` // 已招募人数
  143. CreatedAt *gtime.Time `json:"created_at"` // 创建时间
  144. UpdatedAt *gtime.Time `json:"updated_at"` // 修改时间
  145. AutoFailAt *gtime.Time `json:"auto_fail_at"` // 失效自动处理时间
  146. AutoTaskId int `json:"auto_task_id"` // 定时任务id
  147. AutoDefaultId int `json:"auto_default_id"` // 违约状态id
  148. PaymentAmount float32 `json:"payment_amount"` // 支付金额
  149. PayAt *gtime.Time `json:"pay_at"` // 支付时间
  150. SubmitAt *gtime.Time `json:"submit_at"` // 提交审核时间
  151. PassAt *gtime.Time `json:"pass_at"` // 审核通过时间
  152. FinishAt *gtime.Time `json:"finish_at"` // 结案时间
  153. EstimatedCost float64 `json:"estimated_cost"` // 预估成本
  154. SettlementAmount float64 `json:"settlement_amount"` // 结算金额
  155. TotalRecruitNum int `json:"total_recruit_num"` // 此任务各策略招募人数总和
  156. Tools string `json:"tools"` // 工具选择,1邀约招募 2样品物流 3审稿工具 4作品审查 5数据巡检 6结算账单(,分隔)
  157. InvoiceStatus int `json:"invoice_status"` // 开票状态(1开票中 2已开票)
  158. WatchedNum int `json:"watched_num"` // 浏览量
  159. YounggeeStore *YounggeeStore `orm:"with:store_id=store_id"` //关联门店
  160. RecruitStrategys []*RecruitStrategy `orm:"with:project_id=local_id"` //门店的策略
  161. Enterprise *Enterprise `orm:"with:enterprise_id=enterprise_id"` //商家信息
  162. YounggeeSupplier *YounggeeSupplier `json:"younggee_supplier"` //服务商信息
  163. PlatformInfo *PlatformInfo `orm:"with:platform_id=local_platform"` //平台信息
  164. LocalInfoSupplier *LocalInfoSupplier //服务商提供的LocalInfo
  165. ProjectBrief []*ProjectBrief `orm:"with:project_id=id"` // 项目brief图
  166. ProjectMaterial []*ProjectMaterial `orm:"with:project_id=id"` // 项目brief图
  167. YounggeeProductPhoto []*YounggeeProductPhoto `orm:"with:store_id=store_id" json:"younggee_product_photo"`
  168. YounggeeTeamBuying *YounggeeTeamBuying `orm:"with:team_buying_id=team_buying_id"`
  169. //违约说明
  170. DraftBreakTime int `json:"draft_break_time"` //初稿上传截止时间
  171. DraftBreakPercent int `json:"draft_break_percent"` //初稿扣款比例
  172. LinkBreakTime int `json:"link_break_time"` //链接上传截止
  173. LinkBreakPercent int `json:"link_break_percent"` //超时扣款比例
  174. DataBreakTime int `json:"data_break_time"` //数据上传截止时间
  175. DataBreakPercent int `json:"data_break_percent"` //超时扣款比例
  176. IsCollected int `json:"is_collected"` //是否收藏
  177. }
  178. type YounggeeStore struct {
  179. gmeta.Meta `orm:"table:younggee_store"`
  180. StoreId int `json:"store_id"` // 门店id
  181. StoreName string `json:"store_name"` // 门店名称
  182. StoreCategory string `json:"store_category"` // 门店类目(/分隔)
  183. StoreType int `json:"store_type"` // 门店类型,1单门店,2连锁门店
  184. StoreLocation string `json:"store_location"` // 门店地址
  185. StoreDetail string `json:"store_detail"` // 门店特点
  186. StoreLink string `json:"store_link"` // 分销链接
  187. TeamNum int `json:"team_num"` // 包含团购套餐数
  188. BelongEnterpriseId string `json:"belong_enterprise_id"` // 门店所属商家ID
  189. CreatedAt *gtime.Time `json:"created_at"` // 创建时间
  190. IsDeleted int `json:"is_deleted"` // 已删除(0否 1是)
  191. OperateType int `json:"operate_type"` // 操作人类型(1商家 2后台)
  192. EnterpriseId string `json:"enterprise_id"` // 商家id
  193. SubAccountId int `json:"sub_account_id"` // 商家子账号id
  194. //YounggeeTeamBuying []*YounggeeTeamBuying `orm:"with:store_id=store_id"` //关联团购
  195. YounggeeProductPhoto []*YounggeeProductPhoto `orm:"with:store_id=store_id"` //门店照片
  196. }
  197. type YounggeeTeamBuying struct {
  198. gmeta.Meta `orm:"table:younggee_team_buying"`
  199. TeamBuyingId int `json:"team_buying_id"` // 团购id
  200. StoreId int `json:"store_id"` // 所属门店ID
  201. TeamBuyingCategory string `json:"team_buying_category"` // 团购类目(/分隔)
  202. TeamBuyingName string `json:"team_buying_name"` // 团购标题
  203. TeamBuyingPrice float64 `json:"team_buying_price"` // 团购售价
  204. PublicCommission int `json:"public_commission"` // 公开佣金%
  205. TeamBuyingDetail string `json:"team_buying_detail"` // 团购详情
  206. TeamBuyingLink string `json:"team_buying_link"` // 分销链接
  207. CreatedAt *gtime.Time `json:"created_at"` // 创建时间
  208. IsDeleted int `json:"is_deleted"` // 删除(0否 1是)
  209. OperateType int `json:"operate_type"` // 操作人类型(1商家 2后台)
  210. EnterpriseId string `json:"enterprise_id"` // 商家id
  211. SubAccountId int `json:"sub_account_id"` // 商家子账号id
  212. }
  213. // 种草收藏表信息
  214. type LocalCollection struct {
  215. gmeta.Meta `orm:"younggee_project_collect_info"`
  216. CollectionId int `json:"collection_id"` // 主键自增长
  217. TalentId string `json:"talent_id"` //
  218. LocalId string `json:"local_id"`
  219. CreateTime *gtime.Time `json:"create_time"`
  220. Deleted int `json:"deleted"` //默认为0。0:收藏。1:取消收藏
  221. }
  222. // 展示种草收藏list
  223. type LocalCollectionInfoList struct {
  224. Count int `json:"count"`
  225. LocalCollectionList []*LocalInfoDetail `json:"LocalCollectionList"`
  226. }
  227. type LocalInfoList struct {
  228. MaxPage int `json:"max_page"`
  229. LocalInfos []*YounggeeLocalLifeInfo
  230. //ProjectDetail []*ProjectDetail
  231. }