task_detail.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. package talent_model
  2. import (
  3. "github.com/gogf/gf/database/gdb"
  4. "github.com/gogf/gf/os/gtime"
  5. "github.com/gogf/gf/util/gmeta"
  6. )
  7. type TaskBrandInfo struct {
  8. gmeta.Meta `orm:"table:brand"`
  9. BrandId int `json:"-"`
  10. BrandName string `json:"brand_name"`
  11. BrandLogo string `json:"brand_logo"`
  12. BrandInfo string `json:"brand_info"`
  13. }
  14. type TaskHelpInfo struct {
  15. gmeta.Meta `orm:"table:task_perform_help_info"`
  16. BrandKeyword string `json:"brand_keyword"`
  17. ProductMerits string `json:"product_merits"`
  18. AppendTopic string `json:"append_topic"`
  19. CaptureRequirement string `json:"capture_requirement"`
  20. RemainDays int `json:"remain_days"`
  21. OtherPerformRequire string `json:"other_perform_require"`
  22. CaptureReference string `json:"capture_reference"`
  23. CustomServiceQrcode string `json:"custom_service_qrcode"`
  24. BriefList string `json:"brief_list"`
  25. TaskBaseId int `json:"-"`
  26. }
  27. type WorkflowNodes struct {
  28. gmeta.Meta `orm:"table:workflow_node_container"`
  29. OrderId int `json:"-"`
  30. TaskFlag int `orm:"where:task_flag=1" json:"task_flag"`
  31. NodeNameFirst string `json:"node_name_first"`
  32. SortId int `orm:"order:sort_id asc" json:"sort_id"`
  33. }
  34. type TaskRecruitRequest struct {
  35. gmeta.Meta `orm:"table:task_recruit_requirements"`
  36. TaskBaseId int `json:"-"`
  37. TalentSkillsOn string `json:"talent_skills_on"`
  38. InteractType string `json:"interact_type"`
  39. RegionCode int `json:"region_code"`
  40. Gender int `json:"gender"`
  41. OtherRequirement string `json:"other_requirement"`
  42. }
  43. type TaskRewardInfo struct {
  44. gmeta.Meta `orm:"table:task_reward"`
  45. TaskBaseId int `json:"-"`
  46. IsRewardGoods bool `json:"is_reward_goods"`
  47. RewardGoodsInfo string `json:"reward_goods_info"`
  48. IsPaymentArticle bool `json:"is_payment_article"`
  49. PaymentValue string `json:"payment_value"`
  50. OtherRewardInfo string `json:"other_reward_info"`
  51. }
  52. type BuySamplesCost struct {
  53. gmeta.Meta `orm:"table:task_procedure_buy_samples_info"`
  54. TaskBaseId int `json:"-"`
  55. BuySamplesCost int64 `json:"buy_samples_cost"`
  56. BuySamplesRefund int64 `json:"buy_samples_refund"`
  57. }
  58. type IsBuySamples struct {
  59. gmeta.Meta `orm:"table:task_procedure_decision_condition"`
  60. TaskBaseId int `json:"-"`
  61. BuySamplesType int `json:"buy_samples_type"`
  62. BuySamplesCost int64 `json:"buySamplesCost"` // 拍单费用
  63. BuySamplesRefund int64 `json:"buySamplesRefund"` // 拍单退费
  64. }
  65. type OrderInfo struct {
  66. gmeta.Meta `orm:"table:order_info"`
  67. SignupId int `json:"signup_id"`
  68. TaskId int `json:"task_id"`
  69. TalentId int `json:"talent_id"`
  70. }
  71. type NeedTalentCount struct {
  72. gmeta.Meta `orm:"table:task_recruit_talent_level"`
  73. TrtId int `json:"trt_id"`
  74. TaskBaseId int `json:"-"`
  75. FansCountMin int `json:"fans_count_min"`
  76. FansCountMax int `json:"fans_count_max"`
  77. NeedTalentCount int `json:"need_talent_count"`
  78. RewardRoyalties int64 `json:"reward_royalties"`
  79. SignupCount int64 `json:"signup_count"`
  80. }
  81. type ProductPhoto struct {
  82. gmeta.Meta `orm:"table:product_photo"`
  83. //Id int `json:"id"`
  84. ProductId int `json:"-"`
  85. Symbol int `json:"symbol"`
  86. PhotoUrl string `json:"photo_url"`
  87. }
  88. type ProductInfo struct {
  89. gmeta.Meta `orm:"table:product"`
  90. ProductId int `json:"-"`
  91. ProductName string `json:"product_name"`
  92. ProductPrice int64 `json:"product_price"`
  93. ProductSpecification string `json:"product_specification"`
  94. ProductImages []*ProductPhoto `orm:"with:product_id=product_id"`
  95. }
  96. type PlatformInfo struct {
  97. gmeta.Meta `orm:"table:info_third_platform"`
  98. PlatformId int `json:"platform_id"`
  99. PlatformIcon string `json:"platform_icon"`
  100. PlatformTableName string `json:"platform_table_name"`
  101. }
  102. type TaskDetail struct {
  103. gmeta.Meta `orm:"table:task_base_info"`
  104. TaskId int `json:"task_id"`
  105. TaskMode int `json:"task_mode"`
  106. TaskName string `json:"task_name"`
  107. TaskPlatform int `json:"task_platform"`
  108. ContentForm int `json:"content_form"`
  109. OtherForm int `json:"other_form"`
  110. TaskStatus int `json:"task_status"` // 任务状态:1待支付(待上线) 2执行中 3已结案
  111. StartTime gtime.Time `json:"start_time"`
  112. EndTime gtime.Time `json:"end_time"`
  113. DeadlineTime gtime.Time `json:"deadline_time"`
  114. ProductId int `json:"-"`
  115. BrandId int `json:"-"`
  116. ProductInfo *ProductInfo `orm:"with:product_id=product_id"`
  117. NeedTalentCount []*NeedTalentCount `orm:"with:task_base_id=task_id, order:fans_count_min asc"`
  118. TaskSignUpInfo []*OrderInfo `orm:"with:task_id=task_id"`
  119. IsBuySamples *IsBuySamples `orm:"with:task_base_id=task_id"`
  120. //BuySamplesCost *BuySamplesCost `orm:"with:task_base_id=task_id"`
  121. TaskRewardInfo *TaskRewardInfo `orm:"with:task_base_id=task_id"`
  122. TaskRecruitRequest *TaskRecruitRequest `orm:"with:task_base_id=task_id"`
  123. TaskHelpInfo *TaskHelpInfo `orm:"with:task_base_id=task_id"`
  124. TaskBrandInfo *TaskBrandInfo `orm:"with:brand_id=brand_id"`
  125. PlatformInfo *PlatformInfo `orm:"with:platform_id=task_platform"`
  126. }
  127. type SignupPageTaskDetail struct {
  128. gmeta.Meta `orm:"table:task_base_info"`
  129. TaskId int `json:"task_id"`
  130. TaskModel int `json:"task_model"`
  131. TaskName string `json:"task_name"`
  132. TaskPlatform int `json:"task_platform"`
  133. ContentForm int `json:"content_form"`
  134. OtherForm int `json:"other_form"`
  135. StartTime gtime.Time `json:"start_time"`
  136. EndTime gtime.Time `json:"end_time"`
  137. DeadlineTime gtime.Time `json:"deadline_time"`
  138. ProductId int `json:"-"`
  139. BrandId int `json:"-"`
  140. ProductInfo *ProductInfo `orm:"with:product_id=product_id"`
  141. NeedTalentCount []*NeedTalentCount `orm:"with:task_base_id=task_id, order:fans_count_min asc"`
  142. TaskSignUpInfo []*OrderInfo `orm:"with:task_id=task_id"`
  143. IsBuySamples *IsBuySamples `orm:"with:task_base_id=task_id"`
  144. //BuySamplesCost *BuySamplesCost `orm:"with:task_base_id=task_id"`
  145. TaskRewardInfo *TaskRewardInfo `orm:"with:task_base_id=task_id"`
  146. TaskRecruitRequest *TaskRecruitRequest `orm:"with:task_base_id=task_id"`
  147. TaskHelpInfo *TaskHelpInfo `orm:"with:task_base_id=task_id"`
  148. TaskBrandInfo *TaskBrandInfo `orm:"with:brand_id=brand_id"`
  149. PlatformInfo *PlatformInfo `orm:"with:platform_id=task_platform"`
  150. DeliveryAddress *gdb.Record `json:"delivery_address"`
  151. PlatformDetail *gdb.Record `json:"platform_detail"`
  152. }
  153. type FansCountAndTaskSignupInfo struct {
  154. FansCountInfo gdb.Record `json:"fans_count_info"`
  155. IsSignupTask int `json:"is_signup_task"`
  156. }