scrm-go

service_models.go 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. package models
  2. import "time"
  3. type ServeOrder struct {
  4. ID int64 `gorm:"column:id" json:"id"`
  5. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  6. Period int64 `gorm:"column:period" json:"period"`
  7. PeriodStart int64 `gorm:"column:period_start" json:"period_start"`
  8. PeriodEnd int64 `gorm:"column:period_end" json:"period_end"`
  9. PeriodStartTime time.Time `gorm:"column:period_start_time" json:"period_start_time"`
  10. PeriodEndTime time.Time `gorm:"column:period_end_time" json:"period_end_time"`
  11. Status int64 `gorm:"column:status" json:"status"`
  12. CreatedTime int64 `gorm:"column:created_time" json:"created_time"`
  13. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time"`
  14. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  15. OrderStatus int64 `gorm:"column:order_status" json:"order_status"`
  16. PayType int64 `gorm:"column:pay_type" json:"pay_type"`
  17. PayTime int64 `gorm:"column:pay_time" json:"pay_time"`
  18. PaymentAmount float64 `gorm:"column:payment_amount" json:"payment_amount"`
  19. PayableAmount float64 `gorm:"column:payable_amount" json:"payable_amount"`
  20. DiscountableAmount float64 `gorm:"column:discountable_amount" json:"discountable_amount"`
  21. PaymentTransactionId string `gorm:"column:payment_transaction_id" json:"payment_transaction_id"`
  22. ServeName string `gorm:"column:serve_name" json:"serve_name"`
  23. ServeDesc string `gorm:"column:serve_desc" json:"serve_desc"`
  24. ServeDuration string `gorm:"column:serve_duration" json:"serve_duration"`
  25. OrderExpireTime int64 `gorm:"column:order_expire_time" json:"order_expire_time"`
  26. Price float64 `gorm:"column:price" json:"price"`
  27. Quantity int64 `gorm:"column:quantity" json:"quantity"`
  28. ServeId int64 `gorm:"column:serve_id" json:"serve_id"`
  29. OrderExpireTimeFormat string `gorm:"-"`
  30. }
  31. func (ServeOrder) TableName() string {
  32. return "sgj_serve_order"
  33. }
  34. type ServeOrderInfomation struct {
  35. ID int64 `gorm:"column:id" json:"id"`
  36. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  37. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  38. ProductId int64 `gorm:"column:product_id" json:"product_id"`
  39. ProductName string `gorm:"column:product_name" json:"product_name"`
  40. ProductDesc string `gorm:"column:product_desc" json:"product_desc"`
  41. Price float64 `gorm:"column:price" json:"price"`
  42. Quantity int64 `gorm:"column:quantity" json:"quantity"`
  43. MarketPrice float64 `gorm:"column:market_price" json:"market_price"`
  44. Status int64 `gorm:"column:status" json:"status"`
  45. }
  46. func (ServeOrderInfomation) TableName() string {
  47. return "sgj_serve_order_infomation"
  48. }
  49. type ServeProduct struct {
  50. ID int64 `gorm:"column:id" json:"id"`
  51. ServeName string `gorm:"column:serve_name" json:"serve_name"`
  52. ServeDesc string `gorm:"column:serve_desc" json:"serve_desc"`
  53. OriginalPrice float64 `gorm:"column:original_price" json:"original_price"`
  54. Price float64 `gorm:"column:price" json:"price"`
  55. Status int64 `gorm:"column:status" json:"status"`
  56. CreatedTime int64 `gorm:"column:created_time" json:"created_time"`
  57. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time"`
  58. ServeDuration int64 `gorm:"column:serve_duration" json:"serve_duration"`
  59. Edition int64 `gorm:"column:edition" json:"edition"`
  60. }
  61. func (ServeProduct) TableName() string {
  62. return "sgj_serve_product"
  63. }
  64. type ServeSubscibe struct {
  65. ID int64 `gorm:"column:id" json:"id"`
  66. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  67. PeriodStart int64 `gorm:"column:period_start" json:"period_start"`
  68. PeriodEnd int64 `gorm:"column:period_end" json:"period_end"`
  69. PeriodStartTime time.Time `gorm:"column:period_start_time" json:"period_start_time"`
  70. PeriodEndTime time.Time `gorm:"column:period_end_time" json:"period_end_time"`
  71. Status int64 `gorm:"column:status" json:"status"`
  72. CreatedTime int64 `gorm:"column:created_time" json:"created_time"`
  73. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time"`
  74. State int64 `gorm:"column:state" json:"state" form:"statstateus"`
  75. Org Org `gorm:"ForeignKey:OrgId"`
  76. Patients int64 `gorm:"-" json:"patients"`
  77. }
  78. func (ServeSubscibe) TableName() string {
  79. return "sgj_serve_subscibe"
  80. }
  81. type ServeInvoice struct {
  82. ID int64 `gorm:"column:id" json:"id" form:"id"`
  83. InvoiceType int64 `gorm:"column:invoice_type" json:"invoice_type" form:"invoice_type"`
  84. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  85. InvoiceTitle string `gorm:"column:invoice_title" json:"invoice_title" form:"invoice_title"`
  86. InvoiceAmountGross float64 `gorm:"column:invoice_amount_gross" json:"invoice_amount_gross" form:"invoice_amount_gross"`
  87. Recipient string `gorm:"column:recipient" json:"recipient" form:"recipient"`
  88. ContactPhone string `gorm:"column:contact_phone" json:"contact_phone" form:"contact_phone"`
  89. Address string `gorm:"column:address" json:"address" form:"address"`
  90. TaxIdentificationNumber string `gorm:"column:tax_identification_number" json:"tax_identification_number" form:"tax_identification_number"`
  91. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  92. Status int64 `gorm:"column:status" json:"status" form:"status"`
  93. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  94. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  95. Orders string `gorm:"column:orders" json:"orders" form:"orders"`
  96. InvoiceStatus int64 `gorm:"column:invoice_status" json:"invoice_status" form:"invoice_status"`
  97. }
  98. func (ServeInvoice) TableName() string {
  99. return "sgj_serve_invoice"
  100. }
  101. type ServeOrderContract struct {
  102. ID int64 `gorm:"column:id" json:"id" form:"id"`
  103. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  104. OrderId int64 `gorm:"column:order_id" json:"order_id" form:"order_id"`
  105. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  106. CompanyTitle string `gorm:"column:company_title" json:"company_title" form:"company_title"`
  107. CompanyAddress string `gorm:"column:company_address" json:"company_address" form:"company_address"`
  108. ContactPhone string `gorm:"column:contact_phone" json:"contact_phone" form:"contact_phone"`
  109. Contact string `gorm:"column:contact" json:"contact" form:"contact"`
  110. Status int64 `gorm:"column:status" json:"status" form:"status"`
  111. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  112. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  113. }
  114. func (ServeOrderContract) TableName() string {
  115. return "sgj_serve_order_contract"
  116. }