DoMain.go 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. package domain
  2. import (
  3. "fmt"
  4. "time"
  5. )
  6. // Article 文章
  7. type Article struct {
  8. Id int64 `json:"id"` // 11 0 注释:id
  9. ArticleTitle string `xorm:"article_title" json:"articleTitle"` // 255 0 注释:文章名称
  10. ArticleDesc string `xorm:"article_desc" json:"articleDesc"` // 255 0 注释:文章简介
  11. ArticleContent string `xorm:"article_content" json:"articleContent"` // 0 0 注释:文章内容
  12. State string `xorm:"state" json:"state"` // 255 0 注释:状态
  13. ArticleTagIds string `xorm:"article_tag_ids" json:"articleTagIds"` // 255 0 注释:文章标签
  14. ArticleTopicId int64 `xorm:"article_topic_id" json:"articleTopicId"` // 11 0 注释:文章主题id
  15. Image string `xorm:"image" json:"image"` // 255 0 注释:图片
  16. PublishTime time.Time `xorm:"publish_time" json:"publishTime"` // 0 0 注释:发表时间
  17. EyeFill int64 `xorm:"eye_fill" json:"eyeFill"` // 11 0 注释:浏览量
  18. LikeCount int64 `xorm:"like_count" json:"likeCount"` // 255 0 注释:点赞量
  19. CreateBy string `xorm:"create_by" json:"createBy"` // 255 0 注释:创建人
  20. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:创建时间
  21. UpdateBy string `xorm:"update_by" json:"updateBy"` // 255 0 注释:更新人
  22. UpdateTime time.Time `xorm:"update_time" json:"updateTime"` // 0 0 注释:更新时间
  23. }
  24. func (receiver Article) String() string {
  25. return fmt.Sprint("Article{Id:", receiver.Id, ",ArticleTitle:", receiver.ArticleTitle, ",ArticleDesc:", receiver.ArticleDesc, ",ArticleContent:", receiver.ArticleContent, ",State:", receiver.State, ",ArticleTagIds:", receiver.ArticleTagIds, ",ArticleTopicId:", receiver.ArticleTopicId, ",Image:", receiver.Image, ",PublishTime:", receiver.PublishTime, ",EyeFill:", receiver.EyeFill, ",LikeCount:", receiver.LikeCount, ",CreateBy:", receiver.CreateBy, ",CreateTime:", receiver.CreateTime, ",UpdateBy:", receiver.UpdateBy, ",UpdateTime:", receiver.UpdateTime, "}")
  26. }
  27. // ArticleTag 文章标签
  28. type ArticleTag struct {
  29. Id int64 `json:"id"` // 11 0 注释:
  30. TagName string `xorm:"tag_name" json:"tagName"` // 255 0 注释:标签名
  31. TagDesc string `xorm:"tag_desc" json:"tagDesc"` // 255 0 注释:标签描述
  32. TagTextColor string `xorm:"tag_text_color" json:"tagTextColor"` // 10 0 注释:标签字体颜色
  33. TagBackgroundColor string `xorm:"tag_background_color" json:"tagBackgroundColor"` // 10 0 注释:标签背景颜色
  34. }
  35. func (receiver ArticleTag) String() string {
  36. return fmt.Sprint("ArticleTag{Id:", receiver.Id, ",TagName:", receiver.TagName, ",TagDesc:", receiver.TagDesc, ",TagTextColor:", receiver.TagTextColor, ",TagBackgroundColor:", receiver.TagBackgroundColor, "}")
  37. }
  38. // ArticleTopic 文章主题
  39. type ArticleTopic struct {
  40. Id int64 `json:"id"` // 11 0 注释:
  41. Image string `xorm:"image" json:"image"` // 255 0 注释:图片
  42. TopicName string `xorm:"topic_name" json:"topicName"` // 255 0 注释:主题名称
  43. TopicDesc string `xorm:"topic_desc" json:"topicDesc"` // 255 0 注释:主题描述
  44. }
  45. func (receiver ArticleTopic) String() string {
  46. return fmt.Sprint("ArticleTopic{Id:", receiver.Id, ",Image:", receiver.Image, ",TopicName:", receiver.TopicName, ",TopicDesc:", receiver.TopicDesc, "}")
  47. }
  48. // Authority
  49. type Authority struct {
  50. Id int64 `json:"id"` // 11 0 注释:
  51. AuthorityName string `xorm:"authority_name" json:"authorityName"` // 255 0 注释:
  52. AuthorityPath string `xorm:"authority_path" json:"authorityPath"` // 255 0 注释:
  53. }
  54. func (receiver Authority) String() string {
  55. return fmt.Sprint("Authority{Id:", receiver.Id, ",AuthorityName:", receiver.AuthorityName, ",AuthorityPath:", receiver.AuthorityPath, "}")
  56. }
  57. // BackAuthority 后台权限校验
  58. type BackAuthority struct {
  59. Id int64 `json:"id"` // 11 0 注释:id
  60. AuthorityName string `xorm:"authority_name" json:"authorityName"` // 255 0 注释:接口名
  61. AuthorityPath string `xorm:"authority_path" json:"authorityPath"` // 255 0 注释:接口路径
  62. Method string `xorm:"method" json:"method"` // 8 0 注释:方法
  63. State string `xorm:"state" json:"state"` // 5 0 注释:接口是否启用(0关闭,1启用)
  64. AuthorityVerification string `xorm:"authority_verification" json:"authorityVerification"` // 255 0 注释:权限校验
  65. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:创建时间
  66. }
  67. func (receiver BackAuthority) String() string {
  68. return fmt.Sprint("BackAuthority{Id:", receiver.Id, ",AuthorityName:", receiver.AuthorityName, ",AuthorityPath:", receiver.AuthorityPath, ",Method:", receiver.Method, ",State:", receiver.State, ",AuthorityVerification:", receiver.AuthorityVerification, ",CreateTime:", receiver.CreateTime, "}")
  69. }
  70. // BackMenu 后台菜单
  71. type BackMenu struct {
  72. Id int64 `json:"id"` // 11 0 注释:id
  73. BackMenuName string `xorm:"back_menu_name" json:"backMenuName"` // 255 0 注释:菜单名称
  74. BackMenuPater int64 `xorm:"back_menu_pater" json:"backMenuPater"` // 11 0 注释:父级菜单
  75. Sort int64 `xorm:"sort" json:"sort"` // 11 0 注释:排序
  76. Icon string `xorm:"icon" json:"icon"` // 255 0 注释:图标
  77. Remark string `xorm:"remark" json:"remark"` // 255 0 注释:备注
  78. BackRouterPath string `xorm:"back_router_path" json:"backRouterPath"` // 255 0 注释:路由路径
  79. State string `xorm:"state" json:"state"` // 255 0 注释:状态
  80. }
  81. func (receiver BackMenu) String() string {
  82. return fmt.Sprint("BackMenu{Id:", receiver.Id, ",BackMenuName:", receiver.BackMenuName, ",BackMenuPater:", receiver.BackMenuPater, ",Sort:", receiver.Sort, ",Icon:", receiver.Icon, ",Remark:", receiver.Remark, ",BackRouterPath:", receiver.BackRouterPath, ",State:", receiver.State, "}")
  83. }
  84. // BackRole 后台角色
  85. type BackRole struct {
  86. Id int64 `json:"id"` // 11 0 注释:
  87. RoleName string `xorm:"role_name" json:"roleName"` // 255 0 注释:
  88. }
  89. func (receiver BackRole) String() string {
  90. return fmt.Sprint("BackRole{Id:", receiver.Id, ",RoleName:", receiver.RoleName, "}")
  91. }
  92. // BackRoleAuthority 后台角色权限表
  93. type BackRoleAuthority struct {
  94. Id int64 `json:"id"` // 11 0 注释:
  95. RoleId int64 `xorm:"role_id" json:"roleId"` // 11 0 注释:角色id
  96. AuthorityId int64 `xorm:"authority_id" json:"authorityId"` // 11 0 注释:权限id
  97. }
  98. func (receiver BackRoleAuthority) String() string {
  99. return fmt.Sprint("BackRoleAuthority{Id:", receiver.Id, ",RoleId:", receiver.RoleId, ",AuthorityId:", receiver.AuthorityId, "}")
  100. }
  101. // BackRoleMenu 后台角色菜单表
  102. type BackRoleMenu struct {
  103. Id int64 `json:"id"` // 11 0 注释:
  104. RoleId int64 `xorm:"role_id" json:"roleId"` // 11 0 注释:角色id
  105. MenuId int64 `xorm:"menu_id" json:"menuId"` // 11 0 注释:枚舉id
  106. }
  107. func (receiver BackRoleMenu) String() string {
  108. return fmt.Sprint("BackRoleMenu{Id:", receiver.Id, ",RoleId:", receiver.RoleId, ",MenuId:", receiver.MenuId, "}")
  109. }
  110. // DictData 字典数据
  111. type DictData struct {
  112. Id int64 `json:"id"` // 11 0 注释:字典编码
  113. Sort int64 `xorm:"sort" json:"sort"` // 11 0 注释:排序
  114. DictLabel string `xorm:"dict_label" json:"dictLabel"` // 255 0 注释:字典标签
  115. DictValue string `xorm:"dict_value" json:"dictValue"` // 255 0 注释:字典键值
  116. DictType string `xorm:"dict_type" json:"dictType"` // 255 0 注释:字典类型
  117. Status string `xorm:"status" json:"status"` // 5 0 注释:状态
  118. CssStyle string `xorm:"css_style" json:"cssStyle"` // 50 0 注释:样式
  119. IsDefault string `xorm:"is_default" json:"isDefault"` // 5 0 注释:是否默认
  120. Remark string `xorm:"remark" json:"remark"` // 255 0 注释:备注
  121. }
  122. func (receiver DictData) String() string {
  123. return fmt.Sprint("DictData{Id:", receiver.Id, ",Sort:", receiver.Sort, ",DictLabel:", receiver.DictLabel, ",DictValue:", receiver.DictValue, ",DictType:", receiver.DictType, ",Status:", receiver.Status, ",CssStyle:", receiver.CssStyle, ",IsDefault:", receiver.IsDefault, ",Remark:", receiver.Remark, "}")
  124. }
  125. // DictType 字典类型
  126. type DictType struct {
  127. Id int64 `json:"id"` // 11 0 注释:
  128. DictName string `xorm:"dict_name" json:"dictName"` // 50 0 注释:字典名称
  129. DictType string `xorm:"dict_type" json:"dictType"` // 50 0 注释:字典类型
  130. Status string `xorm:"status" json:"status"` // 5 0 注释:状态(1正常/0停用)
  131. Remark string `xorm:"remark" json:"remark"` // 255 0 注释:备注
  132. }
  133. func (receiver DictType) String() string {
  134. return fmt.Sprint("DictType{Id:", receiver.Id, ",DictName:", receiver.DictName, ",DictType:", receiver.DictType, ",Status:", receiver.Status, ",Remark:", receiver.Remark, "}")
  135. }
  136. // GenTable
  137. type GenTable struct {
  138. Id int64 `json:"id"` // 11 0 注释:id
  139. TableName string `xorm:"table_name" json:"tableName"` // 255 0 注释:数据库名
  140. TableComment string `xorm:"table_comment" json:"tableComment"` // 255 0 注释:数据库注释
  141. Name string `xorm:"name" json:"name"` // 255 0 注释:名字
  142. RouterName string `xorm:"router_name" json:"routerName"` // 255 0 注释:路由名
  143. Remark string `xorm:"remark" json:"remark"` // 255 0 注释:备注
  144. }
  145. func (receiver GenTable) String() string {
  146. return fmt.Sprint("GenTable{Id:", receiver.Id, ",TableName:", receiver.TableName, ",TableComment:", receiver.TableComment, ",Name:", receiver.Name, ",RouterName:", receiver.RouterName, ",Remark:", receiver.Remark, "}")
  147. }
  148. // GenTableColumn
  149. type GenTableColumn struct {
  150. Id int64 `json:"id"` // 11 0 注释:id
  151. TableId int64 `xorm:"table_id" json:"tableId"` // 11 0 注释:表格id
  152. Sort int64 `xorm:"sort" json:"sort"` // 255 0 注释:排序
  153. ColumnName string `xorm:"column_name" json:"columnName"` // 255 0 注释:字段名
  154. ColumnComment string `xorm:"column_comment" json:"columnComment"` // 255 0 注释:字段注释
  155. ColumnType string `xorm:"column_type" json:"columnType"` // 255 0 注释:字段类型
  156. GoType string `xorm:"go_type" json:"goType"` // 255 0 注释:go类型
  157. GoField string `xorm:"go_field" json:"goField"` // 255 0 注释:go字段名
  158. IsKey string `xorm:"is_key" json:"isKey"` // 1 0 注释:是否主键
  159. IsIncrement string `xorm:"is_increment" json:"isIncrement"` // 1 0 注释:是否自增
  160. IsRequired string `xorm:"is_required" json:"isRequired"` // 1 0 注释:是否未必填
  161. QueryType string `xorm:"query_type" json:"queryType"` // 255 0 注释:查询方式
  162. VueShowType string `xorm:"vue_show_type" json:"vueShowType"` // 255 0 注释:前端显示类型
  163. DictType string `xorm:"dict_type" json:"dictType"` // 255 0 注释:字典类型
  164. }
  165. func (receiver GenTableColumn) String() string {
  166. return fmt.Sprint("GenTableColumn{Id:", receiver.Id, ",TableId:", receiver.TableId, ",Sort:", receiver.Sort, ",ColumnName:", receiver.ColumnName, ",ColumnComment:", receiver.ColumnComment, ",ColumnType:", receiver.ColumnType, ",GoType:", receiver.GoType, ",GoField:", receiver.GoField, ",IsKey:", receiver.IsKey, ",IsIncrement:", receiver.IsIncrement, ",IsRequired:", receiver.IsRequired, ",QueryType:", receiver.QueryType, ",VueShowType:", receiver.VueShowType, ",DictType:", receiver.DictType, "}")
  167. }
  168. // Goods 商品表
  169. type Goods struct {
  170. Id int64 `json:"id"` // 11 0 注释:id
  171. TypeId int64 `xorm:"type_id" json:"typeId"` // 11 0 注释:分类id
  172. GoodsName string `xorm:"goods_name" json:"goodsName"` // 255 0 注释:商品名字
  173. IntroductionId int64 `xorm:"introduction_id" json:"introductionId"` // 11 0 注释:商品介绍id
  174. SalesVolume int64 `xorm:"sales_volume" json:"salesVolume"` // 255 0 注释:近30天销量
  175. TagIds string `xorm:"tag_ids" json:"tagIds"` // 255 0 注释:商品标签
  176. }
  177. func (receiver Goods) String() string {
  178. return fmt.Sprint("Goods{Id:", receiver.Id, ",TypeId:", receiver.TypeId, ",GoodsName:", receiver.GoodsName, ",IntroductionId:", receiver.IntroductionId, ",SalesVolume:", receiver.SalesVolume, ",TagIds:", receiver.TagIds, "}")
  179. }
  180. // GoodsCommodityArea 商品属性
  181. type GoodsCommodityArea struct {
  182. Id int64 `json:"id"` // 11 0 注释:id
  183. GoodsId int64 `xorm:"goods_id" json:"goodsId"` // 11 0 注释:商品id
  184. CommodityAreaName string `xorm:"commodity_area_name" json:"commodityAreaName"` // 255 0 注释:商品属地名称
  185. DetailImage string `xorm:"detail_image" json:"detailImage"` // 255 0 注释:详情图片
  186. DetailIntroductionId int64 `xorm:"detail_introduction_id" json:"detailIntroductionId"` // 11 0 注释:相关文本详情id
  187. }
  188. func (receiver GoodsCommodityArea) String() string {
  189. return fmt.Sprint("GoodsCommodityArea{Id:", receiver.Id, ",GoodsId:", receiver.GoodsId, ",CommodityAreaName:", receiver.CommodityAreaName, ",DetailImage:", receiver.DetailImage, ",DetailIntroductionId:", receiver.DetailIntroductionId, "}")
  190. }
  191. // GoodsCoupon 优惠券
  192. type GoodsCoupon struct {
  193. Id int64 `json:"id"` // 11 0 注释:id
  194. CouponName string `xorm:"coupon_name" json:"couponName"` // 255 0 注释:优惠券名称
  195. CouponDesc string `xorm:"coupon_desc" json:"couponDesc"` // 255 0 注释:优惠券描述
  196. CashBackPoint float64 `xorm:"cash_back_point" json:"cashBackPoint"` // 11 2 注释:满x
  197. CashBackPrice float64 `xorm:"cash_back_price" json:"cashBackPrice"` // 11 2 注释:减x
  198. ConditionByTopic string `xorm:"condition_by_topic" json:"conditionByTopic"` // 255 0 注释:主题可用,id
  199. ConditionByType string `xorm:"condition_by_type" json:"conditionByType"` // 255 0 注释:类型可用,id
  200. ConditionByGoods string `xorm:"condition_by_goods" json:"conditionByGoods"` // 255 0 注释:商品可用,id
  201. GrantCount string `xorm:"grant_count" json:"grantCount"` // 255 0 注释:发放数量
  202. Count int64 `xorm:"count" json:"count"` // 255 0 注释:优惠券余量
  203. ReceiveType string `xorm:"receive_type" json:"receiveType"` // 255 0 注释:领取条件
  204. Validity string `xorm:"validity" json:"validity"` // 255 0 注释:有效性,领取开始计时(ClaimTiming),固定时间(FixedTime)
  205. ValidityPeriod time.Time `xorm:"validity_period" json:"validityPeriod"` // 0 0 注释:有效期
  206. }
  207. func (receiver GoodsCoupon) String() string {
  208. return fmt.Sprint("GoodsCoupon{Id:", receiver.Id, ",CouponName:", receiver.CouponName, ",CouponDesc:", receiver.CouponDesc, ",CashBackPoint:", receiver.CashBackPoint, ",CashBackPrice:", receiver.CashBackPrice, ",ConditionByTopic:", receiver.ConditionByTopic, ",ConditionByType:", receiver.ConditionByType, ",ConditionByGoods:", receiver.ConditionByGoods, ",GrantCount:", receiver.GrantCount, ",Count:", receiver.Count, ",ReceiveType:", receiver.ReceiveType, ",Validity:", receiver.Validity, ",ValidityPeriod:", receiver.ValidityPeriod, "}")
  209. }
  210. // GoodsCouponUser 优惠券领取
  211. type GoodsCouponUser struct {
  212. Id int64 `json:"id"` // 11 0 注释:id
  213. UserId int64 `xorm:"user_id" json:"userId"` // 11 0 注释:用户id
  214. CouponId int64 `xorm:"coupon_id" json:"couponId"` // 11 0 注释:优惠券id
  215. CollectionTime time.Time `xorm:"collection_time" json:"collectionTime"` // 0 0 注释:领取时间
  216. State string `xorm:"state" json:"state"` // 255 0 注释:状态,已使用2,未使用1,已过期0
  217. }
  218. func (receiver GoodsCouponUser) String() string {
  219. return fmt.Sprint("GoodsCouponUser{Id:", receiver.Id, ",UserId:", receiver.UserId, ",CouponId:", receiver.CouponId, ",CollectionTime:", receiver.CollectionTime, ",State:", receiver.State, "}")
  220. }
  221. // GoodsIntroduction 商品介绍
  222. type GoodsIntroduction struct {
  223. Id int64 `json:"id"` // 11 0 注释:文章id
  224. GoodsArticleName string `xorm:"goods_article_name" json:"goodsArticleName"` // 255 0 注释:商品文章名
  225. GoodsArticle string `xorm:"goods_article" json:"goodsArticle"` // 0 0 注释:商品文章
  226. CreateBy string `xorm:"create_by" json:"createBy"` // 0 0 注释:创建人
  227. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:创建时间
  228. UpdateBy string `xorm:"update_by" json:"updateBy"` // 255 0 注释:更新人
  229. UpdateTime time.Time `xorm:"update_time" json:"updateTime"` // 0 0 注释:更新时间
  230. }
  231. func (receiver GoodsIntroduction) String() string {
  232. return fmt.Sprint("GoodsIntroduction{Id:", receiver.Id, ",GoodsArticleName:", receiver.GoodsArticleName, ",GoodsArticle:", receiver.GoodsArticle, ",CreateBy:", receiver.CreateBy, ",CreateTime:", receiver.CreateTime, ",UpdateBy:", receiver.UpdateBy, ",UpdateTime:", receiver.UpdateTime, "}")
  233. }
  234. // GoodsOrder 商品订单
  235. type GoodsOrder struct {
  236. Id int64 `json:"id"` // 11 0 注释:id
  237. OrderName string `xorm:"order_name" json:"orderName"` // 255 0 注释:订单名
  238. SkuId int64 `xorm:"sku_id" json:"skuId"` // 11 0 注释:skuid
  239. Count int64 `xorm:"count" json:"count"` // 11 0 注释:购买数量
  240. Price float64 `xorm:"price" json:"price"` // 10 2 注释:单价
  241. TotalPrice float64 `xorm:"total_price" json:"totalPrice"` // 10 2 注释:总价
  242. ContactInformation string `xorm:"contact_information" json:"contactInformation"` // 255 0 注释:联系方式
  243. CouponUserId int64 `xorm:"coupon_user_id" json:"couponUserId"` // 11 0 注释:使用的优惠券
  244. State string `xorm:"state" json:"state"` // 10 0 注释:支付状态,0待支付,1待发货,2已发货,3订单完成,4订单异常
  245. CreateBy int64 `xorm:"create_by" json:"createBy"` // 255 0 注释:用户id
  246. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:订单创建时间
  247. }
  248. func (receiver GoodsOrder) String() string {
  249. return fmt.Sprint("GoodsOrder{Id:", receiver.Id, ",OrderName:", receiver.OrderName, ",SkuId:", receiver.SkuId, ",Count:", receiver.Count, ",Price:", receiver.Price, ",TotalPrice:", receiver.TotalPrice, ",ContactInformation:", receiver.ContactInformation, ",CouponUserId:", receiver.CouponUserId, ",State:", receiver.State, ",CreateBy:", receiver.CreateBy, ",CreateTime:", receiver.CreateTime, "}")
  250. }
  251. // GoodsSku 商品规格
  252. type GoodsSku struct {
  253. Id int64 `json:"id"` // 11 0 注释:
  254. SkuImage string `xorm:"sku_image" json:"skuImage"` // 255 0 注释:sku图片
  255. SkuName string `xorm:"sku_name" json:"skuName"` // 255 0 注释:商品sku名字
  256. Price float64 `xorm:"price" json:"price"` // 10 2 注释:现在价格
  257. HistoricalPrices float64 `xorm:"historical_prices" json:"historicalPrices"` // 10 2 注释:历史价格
  258. InventoryNumber int64 `xorm:"inventory_number" json:"inventoryNumber"` // 11 0 注释:库存
  259. CommodityAreaId int64 `xorm:"commodity_area_id" json:"commodityAreaId"` // 11 0 注释:属地id
  260. GoodsId int64 `xorm:"goods_id" json:"goodsId"` // 11 0 注释:商品id
  261. CreateBy string `xorm:"create_by" json:"createBy"` // 255 0 注释:创建人
  262. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:创建时间
  263. }
  264. func (receiver GoodsSku) String() string {
  265. return fmt.Sprint("GoodsSku{Id:", receiver.Id, ",SkuImage:", receiver.SkuImage, ",SkuName:", receiver.SkuName, ",Price:", receiver.Price, ",HistoricalPrices:", receiver.HistoricalPrices, ",InventoryNumber:", receiver.InventoryNumber, ",CommodityAreaId:", receiver.CommodityAreaId, ",GoodsId:", receiver.GoodsId, ",CreateBy:", receiver.CreateBy, ",CreateTime:", receiver.CreateTime, "}")
  266. }
  267. // GoodsSkuCard 商品卡号
  268. type GoodsSkuCard struct {
  269. Id int64 `json:"id"` // 11 0 注释:id
  270. CardName string `xorm:"card_name" json:"cardName"` // 255 0 注释:卡种名称
  271. State string `xorm:"state" json:"state"` // 255 0 注释:状态,0未使用,1已用,2过期
  272. Count int64 `xorm:"count" json:"count"` // 11 0 注释:库存
  273. TotalCount string `xorm:"total_count" json:"totalCount"` // 255 0 注释:总数
  274. CardKey string `xorm:"card_key" json:"cardKey"` // 255 0 注释:卡密
  275. Use string `xorm:"use" json:"use"` // 5 0 注释:是否已用
  276. UploadTime time.Time `xorm:"upload_time" json:"uploadTime"` // 0 0 注释:入库时间
  277. SkuId int64 `xorm:"sku_id" json:"skuId"` // 11 0 注释:商品规格绑定
  278. Sort string `xorm:"sort" json:"sort"` // 255 0 注释:排序,出售优先级
  279. }
  280. func (receiver GoodsSkuCard) String() string {
  281. return fmt.Sprint("GoodsSkuCard{Id:", receiver.Id, ",CardName:", receiver.CardName, ",State:", receiver.State, ",Count:", receiver.Count, ",TotalCount:", receiver.TotalCount, ",CardKey:", receiver.CardKey, ",Use:", receiver.Use, ",UploadTime:", receiver.UploadTime, ",SkuId:", receiver.SkuId, ",Sort:", receiver.Sort, "}")
  282. }
  283. // GoodsTag 商品标签
  284. type GoodsTag struct {
  285. Id int64 `json:"id"` // 11 0 注释:id
  286. Name string `xorm:"name" json:"name"` // 255 0 注释:名字
  287. IconUrl string `xorm:"icon_url" json:"iconUrl"` // 255 0 注释:图标路径
  288. Tag string `xorm:"tag" json:"tag"` // 255 0 注释:标签
  289. }
  290. func (receiver GoodsTag) String() string {
  291. return fmt.Sprint("GoodsTag{Id:", receiver.Id, ",Name:", receiver.Name, ",IconUrl:", receiver.IconUrl, ",Tag:", receiver.Tag, "}")
  292. }
  293. // GoodsType 商品分类
  294. type GoodsType struct {
  295. Id int64 `json:"id"` // 11 0 注释:
  296. Sort int64 `xorm:"sort" json:"sort"` // 11 0 注释:排序
  297. TypeImage string `xorm:"type_image" json:"typeImage"` // 50 0 注释:类型图片
  298. TypeName string `xorm:"type_name" json:"typeName"` // 255 0 注释:商品类别名称
  299. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:创建时间
  300. }
  301. func (receiver GoodsType) String() string {
  302. return fmt.Sprint("GoodsType{Id:", receiver.Id, ",Sort:", receiver.Sort, ",TypeImage:", receiver.TypeImage, ",TypeName:", receiver.TypeName, ",CreateTime:", receiver.CreateTime, "}")
  303. }
  304. // ManageUser
  305. type ManageUser struct {
  306. Id int64 `json:"id"` // 11 0 注释:
  307. Name string `xorm:"name" json:"name"` // 255 0 注释:名称
  308. Username string `xorm:"username" json:"username"` // 255 0 注释:账号
  309. Password string `xorm:"password" json:"password"` // 255 0 注释:密码
  310. CreationTime int64 `xorm:"creation_time" json:"creationTime"` // 11 0 注释:账号创建时间
  311. LoginTime int64 `xorm:"login_time" json:"loginTime"` // 11 0 注释:登录时间
  312. Status string `xorm:"status" json:"status"` // 255 0 注释:账号状态
  313. RoleId int64 `xorm:"role_id" json:"roleId"` // 11 0 注释:角色id
  314. Phone string `xorm:"phone" json:"phone"` // 255 0 注释:手机
  315. Email string `xorm:"email" json:"email"` // 255 0 注释:邮箱
  316. Avatar string `xorm:"avatar" json:"avatar"` // 255 0 注释:头像
  317. }
  318. func (receiver ManageUser) String() string {
  319. return fmt.Sprint("ManageUser{Id:", receiver.Id, ",Name:", receiver.Name, ",Username:", receiver.Username, ",Password:", receiver.Password, ",CreationTime:", receiver.CreationTime, ",LoginTime:", receiver.LoginTime, ",Status:", receiver.Status, ",RoleId:", receiver.RoleId, ",Phone:", receiver.Phone, ",Email:", receiver.Email, ",Avatar:", receiver.Avatar, "}")
  320. }
  321. // ShopAdviceCarousel 商城广告
  322. type ShopAdviceCarousel struct {
  323. Id int64 `json:"id"` // 11 0 注释:目标id
  324. Name string `xorm:"name" json:"name"` // 255 0 注释:广告名称
  325. ImageUrl string `xorm:"image_url" json:"imageUrl"` // 255 0 注释:图片
  326. ToId int64 `xorm:"to_id" json:"toId"` // 11 0 注释:目标id
  327. ToType string `xorm:"to_type" json:"toType"` // 255 0 注释:目标类型
  328. AdviceType string `xorm:"advice_type" json:"adviceType"` // 255 0 注释:广告类型,用于跳转到对应的页面
  329. Sort string `xorm:"sort" json:"sort"` // 255 0 注释:排序
  330. State string `xorm:"state" json:"state"` // 255 0 注释:状态
  331. ShowType string `xorm:"show_type" json:"showType"` // 50 0 注释:显示类型,carousel轮播图,package,礼包
  332. CreateBy string `xorm:"create_by" json:"createBy"` // 255 0 注释:创建人
  333. CreateTime time.Time `xorm:"create_time" json:"createTime"` // 0 0 注释:创建时间
  334. UpdateBy string `xorm:"update_by" json:"updateBy"` // 255 0 注释:更新人
  335. UpdateTime time.Time `xorm:"update_time" json:"updateTime"` // 0 0 注释:更新时间
  336. }
  337. func (receiver ShopAdviceCarousel) String() string {
  338. return fmt.Sprint("ShopAdviceCarousel{Id:", receiver.Id, ",Name:", receiver.Name, ",ImageUrl:", receiver.ImageUrl, ",ToId:", receiver.ToId, ",ToType:", receiver.ToType, ",AdviceType:", receiver.AdviceType, ",Sort:", receiver.Sort, ",State:", receiver.State, ",ShowType:", receiver.ShowType, ",CreateBy:", receiver.CreateBy, ",CreateTime:", receiver.CreateTime, ",UpdateBy:", receiver.UpdateBy, ",UpdateTime:", receiver.UpdateTime, "}")
  339. }
  340. // ShopTopic 商品主题
  341. type ShopTopic struct {
  342. Id int64 `json:"id"` // 11 0 注释:
  343. Sort string `xorm:"sort" json:"sort"` // 255 0 注释:
  344. ParentId int64 `xorm:"parent_id" json:"parentId"` // 11 0 注释:父级id
  345. TopicPageImage string `xorm:"topic_page_image" json:"topicPageImage"` // 255 0 注释:主题首页图片
  346. TopicName string `xorm:"topic_name" json:"topicName"` // 255 0 注释:主题名称
  347. TopicDesc string `xorm:"topic_desc" json:"topicDesc"` // 255 0 注释:主题描述
  348. TypeIds string `xorm:"type_ids" json:"typeIds"` // 255 0 注释:商品类型id
  349. }
  350. func (receiver ShopTopic) String() string {
  351. return fmt.Sprint("ShopTopic{Id:", receiver.Id, ",Sort:", receiver.Sort, ",ParentId:", receiver.ParentId, ",TopicPageImage:", receiver.TopicPageImage, ",TopicName:", receiver.TopicName, ",TopicDesc:", receiver.TopicDesc, ",TypeIds:", receiver.TypeIds, "}")
  352. }
  353. // ShopTopicSku 商城主题商品
  354. type ShopTopicSku struct {
  355. Id int64 `json:"id"` // 11 0 注释:
  356. TopicId int64 `xorm:"topic_id" json:"topicId"` // 11 0 注释:
  357. SkuId int64 `xorm:"sku_id" json:"skuId"` // 11 0 注释:
  358. }
  359. func (receiver ShopTopicSku) String() string {
  360. return fmt.Sprint("ShopTopicSku{Id:", receiver.Id, ",TopicId:", receiver.TopicId, ",SkuId:", receiver.SkuId, "}")
  361. }
  362. // User 用户表
  363. type User struct {
  364. Id int64 `json:"id"` // 11 0 注释:
  365. Username string `xorm:"username" json:"username"` // 255 0 注释:账号
  366. Password string `xorm:"password" json:"password"` // 255 0 注释:密码
  367. CreationTime int64 `xorm:"creation_time" json:"creationTime"` // 11 0 注释:账号创建时间
  368. LoginTime int64 `xorm:"login_time" json:"loginTime"` // 11 0 注释:登录时间
  369. Status string `xorm:"status" json:"status"` // 255 0 注释:账号状态
  370. RoleId int64 `xorm:"role_id" json:"roleId"` // 11 0 注释:角色id
  371. Phone string `xorm:"phone" json:"phone"` // 255 0 注释:手机
  372. Email string `xorm:"email" json:"email"` // 255 0 注释:邮箱
  373. Name string `xorm:"name" json:"name"` // 255 0 注释:用户名
  374. Avatar string `xorm:"avatar" json:"avatar"` // 255 0 注释:头像
  375. RecommendCode string `xorm:"recommend_code" json:"recommendCode"` // 255 0 注释:推荐码
  376. }
  377. func (receiver User) String() string {
  378. return fmt.Sprint("User{Id:", receiver.Id, ",Username:", receiver.Username, ",Password:", receiver.Password, ",CreationTime:", receiver.CreationTime, ",LoginTime:", receiver.LoginTime, ",Status:", receiver.Status, ",RoleId:", receiver.RoleId, ",Phone:", receiver.Phone, ",Email:", receiver.Email, ",Name:", receiver.Name, ",Avatar:", receiver.Avatar, ",RecommendCode:", receiver.RecommendCode, "}")
  379. }
  380. // UserWallet 用户钱包
  381. type UserWallet struct {
  382. Id int64 `json:"id"` // 11 0 注释:id
  383. UserId int64 `xorm:"user_id" json:"userId"` // 11 0 注释:用户id
  384. Balance float64 `xorm:"balance" json:"balance"` // 65 0 注释:余额
  385. PromotionAmount float64 `xorm:"promotion_amount" json:"promotionAmount"` // 20 2 注释:推广获取总金额
  386. RechargeAmount float64 `xorm:"recharge_amount" json:"rechargeAmount"` // 20 2 注释:充值金额
  387. }
  388. func (receiver UserWallet) String() string {
  389. return fmt.Sprint("UserWallet{Id:", receiver.Id, ",UserId:", receiver.UserId, ",Balance:", receiver.Balance, ",PromotionAmount:", receiver.PromotionAmount, ",RechargeAmount:", receiver.RechargeAmount, "}")
  390. }