tables.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. package model
  2. import (
  3. "go-common/library/time"
  4. )
  5. // Venue 场馆表
  6. type Venue struct {
  7. ID int64
  8. Name string
  9. Status int32
  10. Province int64
  11. City int64
  12. District int64
  13. AddressDetail string
  14. Traffic string
  15. Coordinate string
  16. PlaceNum int32
  17. Ctime time.Time
  18. Mtime time.Time
  19. }
  20. // Coor 项目图片结构
  21. type Coor struct {
  22. Type string
  23. Coor string
  24. }
  25. // ItemDetail 项目详情表
  26. type ItemDetail struct {
  27. ProjectID int64 `json:"id"`
  28. PerformanceDesc string `json:"detail"`
  29. }
  30. // Item 项目表
  31. type Item struct {
  32. ID int64
  33. Name string
  34. Status int32
  35. IsSale int32
  36. StartTime int32
  37. EndTime int32
  38. VenueID int64
  39. PlaceID int64
  40. CompID int64
  41. ExpressFee int32
  42. HasExpressFee int32
  43. ExpressFreeFlag int32
  44. PerformanceImage string
  45. TicketDesc string
  46. BuyNumLimit string
  47. Recommend int32
  48. PromoTags string
  49. VerID uint64
  50. BuyerInfo string
  51. Type int32
  52. SponsorType int32
  53. Label string
  54. Img *ItemImg
  55. }
  56. // ItemImg 项目图片结构
  57. type ItemImg struct {
  58. First struct {
  59. URL string
  60. Desc string
  61. }
  62. Banner struct {
  63. URL string
  64. Desc string
  65. }
  66. }
  67. // Screen 场次表.
  68. type Screen struct {
  69. ID int64
  70. Name string
  71. Status int32
  72. Type int32
  73. TicketType int32
  74. ScreenType int32
  75. DeliveryType int32
  76. PickSeat int32
  77. StartTime int32
  78. EndTime int32
  79. ProjectID int64
  80. SaleStart int64
  81. SaleEnd int64
  82. }
  83. // TicketPrice 票价表
  84. type TicketPrice struct {
  85. ID int64
  86. ParentID int64
  87. Desc string
  88. Type int32
  89. SaleType int32
  90. LinkSc string
  91. LinkTicketID int64
  92. Symbol string
  93. Color string
  94. BuyLimit int32
  95. DescDetail string
  96. ScreenID int64
  97. IsSale int32
  98. IsVisible int32
  99. IsRefund int32
  100. Price int32
  101. OriginPrice int32
  102. MarketPrice int32
  103. ProjectID int64
  104. PaymentMethod int32
  105. PaymentValue int64
  106. SaleTime string
  107. SaleStart time.Time
  108. SaleEnd time.Time
  109. }
  110. // TicketPriceExtra 票价额外表
  111. type TicketPriceExtra struct {
  112. ID int64
  113. ProjectID int64
  114. SkuID int64
  115. Attrib string
  116. Value string
  117. IsDeleted int32
  118. }
  119. // Guest Build guest
  120. type Guest struct {
  121. ID int64 `json:"id"`
  122. GuestImg string `json:"guest_img"`
  123. Name string `json:"name"`
  124. Description string `json:"description"`
  125. Status int8 `json:"status"`
  126. GuestID int64 `json:"guest_id"`
  127. }
  128. // ProjectGuest Build project_guest
  129. type ProjectGuest struct {
  130. ID int64 `json:"id"`
  131. ProjectID int64 `json:"project_id"`
  132. GuestID int64 `json:"guest_id"`
  133. Position int64 `json:"position"`
  134. GuestImg string `json:"guest_img"`
  135. DeleteStatus int32 `json:"delete_status"`
  136. }
  137. // Bulletin Build bulletin
  138. type Bulletin struct {
  139. ID int64 `json:"id"`
  140. Status int8 `json:"status"`
  141. Title string `json:"title"`
  142. Content string `json:"content"`
  143. ProjectID int64 `json:"project_id"`
  144. VerID uint64 `json:"ver_id"`
  145. BulletinID int64 `json:"bulletin_id"`
  146. Ctime time.Time `json:"ctime"`
  147. Mtime time.Time `json:"mtime"`
  148. }
  149. // BulletinExtra Build BulletinExtra
  150. type BulletinExtra struct {
  151. ID int64 `json:"id"`
  152. Detail string `json:"detail"`
  153. BulletinID int64 `json:"bulletin_id"`
  154. }
  155. // Version Build Version
  156. type Version struct {
  157. ID int64 `json:"id"`
  158. VerID uint64 `json:"ver_id"`
  159. Type int32 `json:"type"`
  160. Status int32 `json:"status"`
  161. ItemName string `json:"item_name"`
  162. Ver string `json:"ver"`
  163. TargetItem int64 `json:"target_item"`
  164. AutoPub int32 `json:"auto_pub"`
  165. ParentID int64 `json:"parent_id"`
  166. PubStart time.Time `json:"pub_start"`
  167. PubEnd time.Time `json:"pub_end"`
  168. For int64 `json:"for"`
  169. }
  170. // VersionExt Build
  171. type VersionExt struct {
  172. ID int64 `json:"id"`
  173. VerID uint64 `json:"ver_id"`
  174. Type int32 `json:"type"`
  175. MainInfo string `json:"main_info"`
  176. Ctime time.Time `json:"ctime"`
  177. Mtime time.Time `json:"mtime"`
  178. }
  179. // VersionLog Build VersionLog
  180. type VersionLog struct {
  181. ID int64 `json:"id"`
  182. VerID uint64 `json:"ver_id"`
  183. Type int32 `json:"type"`
  184. Log string `json:"item_name"`
  185. IsPass int32 `json:"is_pass"`
  186. Uname string `json:"uname"`
  187. Ctime time.Time `json:"ctime"`
  188. Mtime time.Time `json:"mtime"`
  189. }
  190. // UserWish 想去表
  191. type UserWish struct {
  192. ID int64 `json:"id"`
  193. MID int64 `json:"mid"`
  194. ItemID int64 `json:"item_id"`
  195. Face string `json:"face"`
  196. Ctime time.Time `json:"ctime"`
  197. Mtime time.Time `json:"mtime"`
  198. }
  199. // Place 场地表
  200. type Place struct {
  201. ID int64 `json:"id"`
  202. Name string `json:"name"`
  203. BasePic string `json:"base_pic"`
  204. Status int32 `json:"status"`
  205. Venue int64 `json:"venue"`
  206. DWidth int32 `json:"d_width"`
  207. DHeight int32 `json:"d_height"`
  208. Ctime time.Time `json:"ctime"`
  209. Mtime time.Time `json:"mtime"`
  210. }
  211. // PlacePolygon 场地坐标表
  212. type PlacePolygon struct {
  213. ID int64 `json:"id"`
  214. Coordinate string `json:"coordinate"`
  215. }
  216. // Area 区域表
  217. type Area struct {
  218. ID int64 `json:"id"`
  219. AID string `json:"name"`
  220. Name string `json:"base_pic"`
  221. SeatsNum int32 `json:"seats_num"`
  222. Width int32 `json:"width"`
  223. Height int32 `json:"height"`
  224. Place int64 `json:"venue"`
  225. DeletedStatus int32 `json:"deleted_status"`
  226. ColStart int32 `json:"col_start"`
  227. ColType int32 `json:"col_type"`
  228. ColDirection int32 `json:"col_direction"`
  229. RowList string `json:"row_list"`
  230. SeatStart string `json:"seat_start"`
  231. Ctime time.Time `json:"ctime"`
  232. Mtime time.Time `json:"mtime"`
  233. }
  234. // AreaSeats 区域座位表
  235. type AreaSeats struct {
  236. ID int64 `json:"id"`
  237. X int32 `json:"x"`
  238. Y int32 `json:"y"`
  239. Label string `json:"label"`
  240. Bgcolor string `json:"bgcolor"`
  241. Area int64 `json:"area"`
  242. Dstatus int32 `json:"dstatus"`
  243. }
  244. // AreaSeatmap 区域座位表
  245. type AreaSeatmap struct {
  246. ID int64 `json:"id"`
  247. SeatMap string `json:"seat_map"`
  248. }
  249. //Promotion 拼团表
  250. type Promotion struct {
  251. ID int64 `json:"id"`
  252. ItemID int64 `json:"item_id"`
  253. SkuID int64 `json:"sku_id"`
  254. Extra int64 `json:"extra"`
  255. BeginTime int32 `json:"begin_time"`
  256. EndTime int32 `json:"end_time"`
  257. Status int32 `json:"status"`
  258. }
  259. //Stock 库存表
  260. type Stock struct {
  261. SkuID int64 `json:"sku_id"`
  262. ParentSkuID int64 `json:"parent_sku_id"`
  263. ItemID int64 `json:"item_id"`
  264. Specs string `json:"specs"`
  265. TotalStock int64 `json:"total_stock"`
  266. Stock int64 `json:"stock"`
  267. }
  268. //ProjectTags 项目标签表
  269. type ProjectTags struct {
  270. ID int64 `json:"id"`
  271. Status int32 `json:"status"`
  272. ProjectID int64 `json:"project_id"`
  273. TagID int64 `json:"tag_id"`
  274. TagName string `json:"tag_name"`
  275. }
  276. // SeatOrder 座位
  277. type SeatOrder struct {
  278. ID int64 `json:"id"`
  279. // 区域ID
  280. AreaID int64 `json:"area_id"`
  281. // 场次ID
  282. ScreenID int64 `json:"screen_id"`
  283. // 订单号
  284. OrderID int64 `json:"order_id"`
  285. // 行号
  286. Row int32 `json:"row"`
  287. // 列号
  288. Col int32 `json:"col"`
  289. // 状态 0-可售 1-已退票 2-已出票 3-已锁定 4-已预订
  290. Status int32 `json:"status"`
  291. // 价格ID
  292. PriceID int64 `json:"price_id"`
  293. // 价格
  294. Price int32 `json:"price"`
  295. // 操作ID,book.id或lock_rec.id
  296. OpID int64 `json:"op_id"`
  297. // 删除时间
  298. DeletedAt time.Time `json:"deleted_at"`
  299. }
  300. // SeatSet 单场座位及价格配置表
  301. type SeatSet struct {
  302. ID int64 `json:"id"`
  303. // 区域ID
  304. AreaID int64 `json:"area_id"`
  305. // 场次ID
  306. ScreenID int64 `json:"screen_id"`
  307. // 票价设置图
  308. SeatChart string `json:"seat_chart"`
  309. }
  310. // Banner banner广告投放信息表
  311. type Banner struct {
  312. ID int64 `json:"id"`
  313. PubStart time.Time `json:"pub_start"`
  314. PubEnd time.Time `json:"pub_end"`
  315. Status int32 `json:"status"`
  316. Name string `json:"name"`
  317. Pic string `json:"pic"`
  318. URL string `json:"url"`
  319. From string `json:"from"`
  320. TargetID int64 `json:"target_id"`
  321. TargetUser int32 `json:"target_user"`
  322. }
  323. // BannerDistrict banner区域关系表
  324. type BannerDistrict struct {
  325. ID int64 `json:"id"`
  326. BannerID int64 `json:"banner_id"`
  327. DistrictID int64 `json:"district_id"`
  328. Position int32 `json:"position"`
  329. SubPosition int32 `json:"sub_position"`
  330. Order int32 `json:"order"`
  331. }
  332. // TableName project.
  333. func (Item) TableName() string {
  334. return "project"
  335. }
  336. // TableName project_extra.
  337. func (ItemDetail) TableName() string {
  338. return "project_extra"
  339. }
  340. // TableName project_guests
  341. func (ProjectGuest) TableName() string {
  342. return "project_guests"
  343. }
  344. // TableName project_bulletin
  345. func (Bulletin) TableName() string {
  346. return "project_bulletin"
  347. }
  348. // TableName bulletin_extra
  349. func (BulletinExtra) TableName() string {
  350. return "bulletin_extra"
  351. }
  352. // TableName venue.
  353. func (Venue) TableName() string {
  354. return "venue"
  355. }
  356. // TableName guest
  357. func (Guest) TableName() string {
  358. return "guest"
  359. }
  360. // TableName version
  361. func (Version) TableName() string {
  362. return "version"
  363. }
  364. // TableName version_ext
  365. func (VersionExt) TableName() string {
  366. return "version_ext"
  367. }
  368. // TableName version_log
  369. func (VersionLog) TableName() string {
  370. return "version_log"
  371. }
  372. // TableName screen
  373. func (Screen) TableName() string {
  374. return "screen"
  375. }
  376. // TableName ticket_price
  377. func (TicketPrice) TableName() string {
  378. return "ticket_price"
  379. }
  380. // TableName ticket_price_extra
  381. func (TicketPriceExtra) TableName() string {
  382. return "ticket_price_extra"
  383. }
  384. // TableName place
  385. func (Place) TableName() string {
  386. return "place"
  387. }
  388. // TableName place_polygon
  389. func (PlacePolygon) TableName() string {
  390. return "place_polygon"
  391. }
  392. // TableName user_wish
  393. func (UserWish) TableName() string {
  394. return "user_wish"
  395. }
  396. // TableName area
  397. func (Area) TableName() string {
  398. return "area"
  399. }
  400. // TableName area_seats
  401. func (AreaSeats) TableName() string {
  402. return "area_seats"
  403. }
  404. // TableName area_seatmap
  405. func (AreaSeatmap) TableName() string {
  406. return "area_seatmap"
  407. }
  408. // TableName promotion
  409. func (Promotion) TableName() string {
  410. return "promotion"
  411. }
  412. // TableName sku_stock
  413. func (Stock) TableName() string {
  414. return "sku_stock"
  415. }
  416. // TableName project_tag
  417. func (ProjectTags) TableName() string {
  418. return "project_tags"
  419. }
  420. // TableName seat_order
  421. func (SeatOrder) TableName() string {
  422. return "seat_order"
  423. }
  424. // TableName seat_set
  425. func (SeatSet) TableName() string {
  426. return "seat_set"
  427. }
  428. // TableName banner
  429. func (Banner) TableName() string {
  430. return "banner"
  431. }
  432. // TableName banner_district
  433. func (BannerDistrict) TableName() string {
  434. return "banner_district"
  435. }