model.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. package model
  2. // open change
  3. const (
  4. OpenChangeNONE int8 = iota
  5. PointChange
  6. Recharge
  7. System
  8. Active
  9. ReacquireDeduction
  10. ActiveCode
  11. SystemDeduction
  12. )
  13. //OpenChangeMap .
  14. var OpenChangeMap = map[int8]string{
  15. OpenChangeNONE: "none",
  16. PointChange: "积分兑换",
  17. Recharge: "充值开通",
  18. System: "系统发放",
  19. Active: "活动赠送",
  20. ReacquireDeduction: "重复领取扣除",
  21. ActiveCode: "激活码",
  22. SystemDeduction: "系统扣减",
  23. }
  24. // const for vip
  25. const (
  26. PlatfromIOS = iota + 1
  27. PlatfromIPAD
  28. PlatfromPC
  29. PlatfromANDROID
  30. PlatfromIPADHD
  31. PlatfromIOSBLUE
  32. PlatfromANDROIDBLUE
  33. PlatfromPUBLIC
  34. PlatfromAutoRenewServer
  35. PlatfromANDROIDI //安卓国际版
  36. )
  37. // const for vip
  38. const (
  39. DeviceIOS = iota + 1
  40. DeviceIPAD
  41. DevicePC
  42. DeviceANDROID
  43. DeviceIPADHD
  44. DEVICEIOSBLUE
  45. DEVICEANDROIDBLUE
  46. DEVICEPUBLIC
  47. )
  48. // const for vip
  49. const (
  50. MobiAppIphone = iota + 1
  51. MobiAppIpad
  52. MobiAppPC
  53. MobiAppANDROID
  54. )
  55. //PlatformByName .
  56. var PlatformByName = map[string]int{
  57. "ios": PlatfromIOS,
  58. "ipad": PlatfromIPAD,
  59. "pc": PlatfromPC,
  60. "android": PlatfromANDROID,
  61. "ipadhd": PlatfromIPADHD,
  62. "ios_b": PlatfromIOSBLUE,
  63. "android_b": PlatfromANDROIDBLUE,
  64. "public": PlatfromPUBLIC,
  65. }
  66. //PlatformByCode .
  67. var PlatformByCode = map[int]string{
  68. PlatfromIOS: "ios",
  69. PlatfromIPAD: "ipad",
  70. PlatfromPC: "pc",
  71. PlatfromANDROID: "android",
  72. }
  73. //MobiAppByName .
  74. var MobiAppByName = map[string]int{
  75. "iphone": MobiAppIphone,
  76. "ipad": MobiAppIpad,
  77. "pc": MobiAppPC,
  78. "android": MobiAppANDROID,
  79. }
  80. //PayWayName payWay name
  81. var PayWayName = map[int8]string{
  82. ALIPAY: "支付宝",
  83. WECHAT: "微信",
  84. BCION: "B币",
  85. BANK: "银行卡",
  86. PAYPAL: "paypal",
  87. IOSPAY: "iospay",
  88. QPAY: "qpay",
  89. }
  90. // user discount history enum
  91. const (
  92. FirstDiscountBuyVip int64 = iota + 1
  93. )
  94. //PayPlatform vip mapping platform
  95. var PayPlatform = map[int]int8{
  96. DeviceIOS: 2,
  97. DeviceIPAD: 2,
  98. DevicePC: 1,
  99. DeviceANDROID: 1,
  100. }
  101. // vip pay remark
  102. const (
  103. RemarkBuy = "充值开通"
  104. RemarkGift = "好友赠送"
  105. )
  106. // business status
  107. const (
  108. StatusOpen = iota //有效
  109. StatusClose = 1 //无效
  110. )
  111. // business status
  112. const (
  113. BizTypeIn = iota //内部
  114. BizTypeOut = 1 //外部
  115. )
  116. //code status
  117. const (
  118. CodeUnUse int8 = iota + 1
  119. CodeUse
  120. CodeFrozen
  121. )
  122. // point change type
  123. const (
  124. ExchangeVip = iota + 1
  125. Charge //充电
  126. Contract //承包
  127. PointSystem //系统发放
  128. FYMReward //分院帽奖励
  129. ExchangePendant //兑换挂件
  130. MJActive //萌节活动
  131. ReAcquirePointDedution //重复领取
  132. )
  133. // user discount
  134. const (
  135. UnUse int8 = iota
  136. Used
  137. )
  138. // IsAutoRenewed is auto renewed.
  139. const (
  140. IsAutoRenewed int32 = 1
  141. )
  142. // bcoin salary status.
  143. const (
  144. BcoinUnissued int8 = iota
  145. Grant
  146. )
  147. // vip status.
  148. const (
  149. Expire int32 = iota
  150. NotExpired
  151. Freeze
  152. Block
  153. )
  154. //batch code status
  155. const (
  156. Nomal = iota
  157. OnlyNotVip
  158. )
  159. // batch status
  160. const (
  161. BatchNormal int8 = iota + 1
  162. BatchFrozen
  163. )
  164. // tips judge type .
  165. const (
  166. VersionTypeNone int8 = iota
  167. VersionMoreThan
  168. VersionEqual
  169. VersionLessThan
  170. )
  171. // vip pay type.
  172. const (
  173. NormalPay int32 = iota
  174. AutoRenewPay
  175. )
  176. // vip tips.
  177. const (
  178. PanelPosition int8 = iota + 1
  179. PgcPosition
  180. )
  181. // switch.
  182. const (
  183. SwitchClose int8 = iota
  184. SwitchOpen
  185. )
  186. const (
  187. // VipUserFirstDiscount 促销类型
  188. VipUserFirstDiscount = 1
  189. )
  190. // Discount status.
  191. const (
  192. DiscountNotUse = iota
  193. DiscountUsed
  194. )
  195. // privilege type.
  196. const (
  197. AllPrivilege int8 = iota
  198. OnlyAnnualPrivilege
  199. )
  200. // privilege resources type.
  201. const (
  202. WebResources = iota
  203. AppResources
  204. )
  205. // privilege title.
  206. const (
  207. PrivilegeTitle = "大会员权益"
  208. AnnualPrivilegeTitle = "年度大会员权益"
  209. )
  210. // plat arg
  211. const (
  212. DeviceIapdName = "pad"
  213. MobiAppIpadName = "ipad"
  214. )
  215. // pay service type
  216. const (
  217. ServiceTypeNormal = 0
  218. ServiceTypeInternational = 2
  219. ServiceTypePublic = 1
  220. ServiceTypeAuto = 7
  221. ServiceTypeIap = 100
  222. )
  223. // pay sub type
  224. const (
  225. PaySubTypeAuto = 1
  226. )
  227. // vip pay type.
  228. const (
  229. NormalPayType int8 = iota
  230. AutoRenewPayType
  231. IapAutoRenewPayType
  232. )
  233. // pay showTitle.
  234. const (
  235. NormalShowTitle = "购买大会员"
  236. AutoRenewShowTitle = "购买大会员连续包月"
  237. )
  238. // vip panel user explain.
  239. const (
  240. UserNotLoginExplain = "点击头像登录或注册优惠价开通大会员"
  241. NotVipExplain = "你还不是大会员,开通福利多多"
  242. ExpireVipExplain = "大会员离你而去了,快来续期吧"
  243. YYYYDDVipExplain = "%s到期,购买后有效期将顺延"
  244. WillExplainVipExplain = "只剩%d天大会员就要离开你而去啦,快来续期吧"
  245. )
  246. // pay param show content.
  247. const (
  248. ShowContent = "购买%d个月大会员"
  249. )
  250. // pay channel id
  251. const (
  252. IapPayChannelID = 100
  253. )