selection_task.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. package youngee_talent_model
  2. import (
  3. "github.com/gogf/gf/os/gtime"
  4. "github.com/gogf/gf/util/gmeta"
  5. "youngmini_server/app/model"
  6. )
  7. type SignSecTaskReq struct {
  8. SelectionId string `json:"selection_id"`
  9. ProductId string `json:"product_id"`
  10. KsProductId string `json:"ks_product_id"`
  11. AddressId uint64 `json:"address_id"` //添加橱窗不需要
  12. LeadTeamId string `json:"lead_team_id"` //添加橱窗不需要
  13. TeamId string `json:"team_id"` //添加橱窗不需要
  14. SaleNum int `json:"sale_num"`
  15. FansNum int `json:"fans"`
  16. OpenId string `json:"open_id"` //选中账号的openid
  17. WxNum string `json:"wx_num"`
  18. IsOk int `json:"is_ok"` //此快手是否满足领样条件 0不满足,1满足
  19. }
  20. type SignSecTaskFromWindowReq struct {
  21. SelectionId string `json:"selection_id"`
  22. ProductId string `json:"product_id"`
  23. KSProductId string `json:"ks_product_id"`
  24. OpenId string `json:"open_id"` //选中账号的openid
  25. }
  26. type SignSecTaskResp struct {
  27. TaskId string `json:"task_id"`
  28. }
  29. type SecTaskInfoDetail struct {
  30. gmeta.Meta `orm:"table:younggee_sec_task_info"`
  31. Id int `orm:"id,primary" json:"id"` // 递增id
  32. TaskId string `orm:"task_id" json:"task_id"` // 选品任务id
  33. SelectionId string `orm:"selection_id" json:"selection_id"` // 选品id
  34. OpenId string `orm:"open_id" json:"open_id"` //快手唯一标识
  35. ProductId string `orm:"product_id" json:"product_id"`
  36. TalentId string `orm:"talent_id" json:"talent_id"` // 达人id
  37. AccountId int `orm:"account_id" json:"account_id"` // 账号id
  38. PlatformId int `orm:"platform_id" json:"platform_id"` // 平台id
  39. TalentPlatformInfoSnap string `orm:"talent_platform_info_snap" json:"talent_platform_info_snap"` // 达人平台信息快照
  40. TalentPersonalInfoSnap string `orm:"talent_personal_info_snap" json:"talent_personal_info_snap"` // 达人个人信息快照
  41. TalentPostAddrSnap string `orm:"talent_post_addr_snap" json:"talent_post_addr_snap"` // 收货地址快照
  42. TaskReward float64 `orm:"task_reward" json:"task_reward"` // 达人赏金
  43. TalentPayment float64 `orm:"talent_payment" json:"talent_payment"` // 达人垫付金额
  44. IsPayPayment int `orm:"is_pay_payment" json:"is_pay_payment"` // 企业是否返样品钱
  45. IsPayReward int `orm:"is_pay_reward" json:"is_pay_reward"` // 企业是否结算悬赏
  46. TaskMode int `orm:"task_mode" json:"task_mode"` // 任务形式,1、2分别表示悬赏任务、纯佣带货',
  47. SampleMode int `orm:"sample_mode" json:"sample_mode"` // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
  48. TaskStatus int `orm:"task_status" json:"task_status"` // 任务状态 1待选 2已选 3落选
  49. TaskStage int `orm:"task_stage" json:"task_stage"` // 任务阶段,详情见info_sec_task_stage表
  50. CreateDate *gtime.Time `orm:"create_date" json:"create_date"` // 创建时间
  51. SelectDate *gtime.Time `orm:"select_date" json:"select_date"` // 反选时间
  52. DeliveryDate *gtime.Time `orm:"delivery_date" json:"delivery_date"` // 发货时间
  53. CompleteDate *gtime.Time `orm:"complete_date" json:"complete_date"` // 结束时间
  54. WithdrawDate *gtime.Time `orm:"withdraw_date" json:"withdraw_date"` // 提现时间
  55. CompleteStatus int `orm:"complete_status" json:"complete_status"` // 结束方式 1未结束 2正常结束 3反选失败
  56. LogisticsStatus int `orm:"logistics_status" json:"logistics_status"` // 发货状态 1 待发货 2已发货 3 已签收
  57. AssignmentStatus uint `orm:"assignment_status" json:"assignment_status"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  58. UpdateAt *gtime.Time `orm:"update_at" json:"update_at"` // 更新时间
  59. WithdrawStatus int `orm:"withdraw_status" json:"withdraw_status"` // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
  60. LeadTeamId string `orm:"lead_team_id" json:"lead_team_id"` // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
  61. TeamId string `orm:"team_id" json:"team_id"` // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
  62. TeamIncome int `orm:"team_income" json:"team_income"` // young之团团长现金收益
  63. TeamPoint int `orm:"team_point" json:"team_point"` // young之团团长积分收益
  64. FansNum int `orm:"fans_num" json:"fans_num"` // 粉丝数
  65. SaleNum int `orm:"sale_num" json:"sale_num"` // 30天橱窗销量
  66. FreeStage int `orm:"free_stage" json:"free_stage"` // 免费领样阶段,1-5分别代表已申请、已拒绝、待发货、已发货、已收货',
  67. RewardStage int `orm:"reward_stage" json:"reward_stage"` //悬赏阶段,1-2分别代表待结算、已结算',
  68. SaleActual int `orm:"sale_actual" json:"sale_actual"`
  69. SaleNumAll int `orm:"sale_num_all" json:"sale_num_all"` //达人对此商品的全部销售量(大于1表示已出单)
  70. RewardStrategy []*RewardStrategy `orm:"with:selection_id=selection_id"` // 悬赏策略表
  71. SelectionInfo *model.YounggeeSelectionInfo `orm:"with:selection_id=selection_id"` //选品表
  72. YounggeeProduct *YounggeeProduct `orm:"with:product_id=product_id"` // 商品基本表
  73. YounggeeProductPhoto []*YounggeeProductPhoto `orm:"with:product_id=product_id"` // 商品图片表
  74. PlatformInfo *PlatformInfo `orm:"with:platform_id=platform_id"` //platform_id=8的是快手平台信息,含有粉丝数和作品数
  75. KsUserInfo []*KuaishouUserInfo `orm:"with:open_id=open_id"`
  76. TaskDdl *gtime.Time `json:"task_ddl"`
  77. WxNum string `orm:"wx_num" json:"wx_num"`
  78. }
  79. type SecTaskInfoWindowDetail struct {
  80. gmeta.Meta `orm:"table:younggee_sec_task_info"`
  81. Id int `orm:"id,primary" json:"id"` // 递增id
  82. TaskId string `orm:"task_id" json:"task_id"` // 选品任务id
  83. SelectionId string `orm:"selection_id" json:"selection_id"` // 选品id
  84. OpenId string `orm:"open_id" json:"open_id"` //快手账号标识
  85. ProductId string `orm:"product_id" json:"product_id"`
  86. TalentId string `orm:"talent_id" json:"talent_id"` // 达人id
  87. AccountId int `orm:"account_id" json:"account_id"` // 账号id
  88. PlatformId int `orm:"platform_id" json:"platform_id"` // 平台id
  89. TalentPlatformInfoSnap string `orm:"talent_platform_info_snap" json:"talent_platform_info_snap"` // 达人平台信息快照
  90. TalentPersonalInfoSnap string `orm:"talent_personal_info_snap" json:"talent_personal_info_snap"` // 达人个人信息快照
  91. //TalentPostAddrSnap string `orm:"talent_post_addr_snap" json:"talent_post_addr_snap"` // 收货地址快照 加入橱窗不需要收获地址
  92. TaskReward float64 `orm:"task_reward" json:"task_reward"` // 达人赏金
  93. TalentPayment float64 `orm:"talent_payment" json:"talent_payment"` // 达人垫付金额
  94. IsPayPayment int `orm:"is_pay_payment" json:"is_pay_payment"` // 企业是否返样品钱
  95. IsPayReward int `orm:"is_pay_reward" json:"is_pay_reward"` // 企业是否结算悬赏
  96. TaskMode int `orm:"task_mode" json:"task_mode"` // 任务形式,1、2分别表示悬赏任务、纯佣带货',
  97. SampleMode int `orm:"sample_mode" json:"sample_mode"` // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
  98. TaskStatus int `orm:"task_status" json:"task_status"` // 任务状态 1待选 2已选 3落选
  99. TaskStage int `orm:"task_stage" json:"task_stage"` // 任务阶段,详情见info_sec_task_stage表
  100. CreateDate *gtime.Time `orm:"create_date" json:"create_date"` // 创建时间
  101. SelectDate *gtime.Time `orm:"select_date" json:"select_date"` // 反选时间
  102. DeliveryDate *gtime.Time `orm:"delivery_date" json:"delivery_date"` // 发货时间
  103. CompleteDate *gtime.Time `orm:"complete_date" json:"complete_date"` // 结束时间
  104. WithdrawDate *gtime.Time `orm:"withdraw_date" json:"withdraw_date"` // 提现时间
  105. CompleteStatus int `orm:"complete_status" json:"complete_status"` // 结束方式 1未结束 2正常结束 3反选失败
  106. LogisticsStatus int `orm:"logistics_status" json:"logistics_status"` // 发货状态 1 待发货 2已发货 3 已签收
  107. AssignmentStatus uint `orm:"assignment_status" json:"assignment_status"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  108. UpdateAt *gtime.Time `orm:"update_at" json:"update_at"` // 更新时间
  109. WithdrawStatus int `orm:"withdraw_status" json:"withdraw_status"` // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
  110. LeadTeamId string `orm:"lead_team_id" json:"lead_team_id"` // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
  111. TeamId string `orm:"team_id" json:"team_id"` // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
  112. TeamIncome int `orm:"team_income" json:"team_income"` // young之团团长现金收益
  113. TeamPoint int `orm:"team_point" json:"team_point"` // young之团团长积分收益
  114. FansNum int `orm:"fans_num" json:"fans_num"` // 粉丝数
  115. SaleNum int `orm:"sale_num" json:"sale_num"` // 30天橱窗销量
  116. FreeStage int `orm:"free_stage" json:"free_stage"` // 免费领样阶段,1-5分别代表已申请、已拒绝、待发货、已发货、已收货',
  117. RewardStage int `orm:"reward_stage" json:"reward_stage"` //悬赏阶段,1-2分别代表待结算、已结算',
  118. SaleActual int `orm:"sale_actual" json:"sale_actual"`
  119. SaleNumAll int `orm:"sale_num_all" json:"sale_num_all"` //达人对此商品的全部销售量(大于1表示已出单)
  120. RewardStrategy []*RewardStrategy `orm:"with:selection_id=selection_id"` // 悬赏策略表
  121. SelectionInfo *model.YounggeeSelectionInfo `orm:"with:selection_id=selection_id"` //选品表
  122. YounggeeProduct *YounggeeProduct `orm:"with:product_id=product_id"` // 商品基本表
  123. YounggeeProductPhoto []*YounggeeProductPhoto `orm:"with:product_id=product_id"` // 商品图片表
  124. PlatformInfo *PlatformInfo `orm:"with:platform_id=platform_id"`
  125. TaskDdl *gtime.Time `json:"task_ddl"`
  126. }
  127. type SecTaskInfoBrief struct {
  128. TaskId string `json:"task_id"` // 选品任务id
  129. SelectionId string `json:"selection_id"` // 选品id
  130. ProductId int `json:"product_id"` // 商品id
  131. TalentId string `json:"talent_id"` // 达人id
  132. AccountId int `json:"account_id"` // 账号id
  133. TalentPlatformInfoSnap string `json:"talent_platform_info_snap"` // 达人平台信息快照
  134. TalentPersonalInfoSnap string `json:"talent_personal_info_snap"` // 达人个人信息快照
  135. TalentPostAddrSnap string `json:"talent_post_addr_snap"` // 收货地址快照
  136. TaskReward float64 `json:"task_reward"` // 达人赏金
  137. TalentPayment float64 `json:"talent_payment"` // 达人垫付金额
  138. IsPayPayment int `json:"is_pay_payment"` // 企业是否返样品钱
  139. IsPayReward int `json:"is_pay_reward"` // 企业是否结算悬赏
  140. TaskMode int `json:"task_mode"` // 任务形式,1、2分别表示纯佣带货、悬赏任务
  141. SampleMode int `json:"sample_mode"` // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
  142. TaskStatus int `json:"task_status"` // 任务状态 1待选 2已选 3落选
  143. TaskStage int `json:"task_stage"` // 任务阶段,详情见info_sec_task_stage表
  144. CreateDate *gtime.Time `json:"create_date"` // 创建时间
  145. SelectDate *gtime.Time `json:"select_date"` // 反选时间
  146. DeliveryDate *gtime.Time `json:"delivery_date"` // 发货时间
  147. CompleteDate *gtime.Time `json:"complete_date"` // 结束时间
  148. WithdrawDate *gtime.Time `json:"withdraw_date"` // 提现时间
  149. CompleteStatus int `json:"complete_status"` // 结束方式 1未结束 2正常结束 3反选失败
  150. LogisticsStatus int `json:"logistics_status"` // 发货状态 1 待发货 2已发货 3 已签收
  151. AssignmentStatus uint `json:"assignment_status"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
  152. UpdateAt *gtime.Time `json:"update_at"` // 更新时间
  153. WithdrawStatus int `json:"withdraw_status"` // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
  154. LeadTeamId string `json:"lead_team_id"` // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
  155. TeamId string `json:"team_id"` // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
  156. TeamIncome float64 `json:"team_income"` // young之团团长现金收益
  157. TeamPoint int `json:"team_point"` // young之团团长积分收益
  158. PlatformIconUrl string `json:"platform_icon_url"`
  159. PlatformName string `json:"platform_name"`
  160. PlatformNickName string `json:"platform_nick_name"`
  161. SelectionName string `json:"selection_name"`
  162. ProductPhotoSnap string `json:"product_photo_snap"`
  163. //YounggeeProductPhoto *[]model.YounggeeProductPhoto // 商品图片表
  164. TaskDdl *gtime.Time `json:"task_ddl"`
  165. }
  166. type SecTaskDetailResp struct {
  167. SecTaskInfo *SecTaskInfoDetail `json:"sec_task_info"`
  168. SelectionDetail *SelectionDetail `json:"selection_detail"`
  169. WithdrawStatus int `json:"withdraw_status"`
  170. }