node_info.go 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. package app
  2. // 引入关联包
  3. import (
  4. "github.com/shopspring/decimal"
  5. )
  6. type NodeInfo struct {
  7. Id int64 `json:"id" gorm:"column:id;type:bigint;comment:id;primarykey;NOT NULL"`
  8. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;comment:创建时间"`
  9. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;comment:更新时间"`
  10. NodeName string `json:"nodeName" gorm:"column:node_name;type:varchar(36);comment:节点名称;index;unique:uni_node_info_node_name"`
  11. SupportPaymentSymbols string `json:"supportPaymentSymbols" gorm:"column:support_payment_symbols;type:varchar(64);comment:支持的支付币种,分割"`
  12. UsdPrice decimal.Decimal `json:"usdPrice" gorm:"column:usd_price;type:decimal(25,8);comment:单价"`
  13. SoldQuantity decimal.Decimal `json:"soldQuantity" gorm:"column:sold_quantity;type:decimal(25,2);comment:已售出数量"`
  14. UpperQuantityLimit decimal.Decimal `json:"upperQuantityLimit" gorm:"column:upper_quantity_limit;type:decimal(25,2);comment:可售出上限"`
  15. LimitTime int64 `json:"limitTime" gorm:"column:limit_time;type:bigint;comment:结束时间"`
  16. Sort int64 `json:"sort" gorm:"column:sort;type:bigint;comment:排序"`
  17. MagicProfitRatio decimal.Decimal `json:"magicProfitRatio" gorm:"column:magic_profit_ratio;type:decimal(25,2);comment:平台静态产出分红比例"`
  18. PersonBuyLimit int64 `json:"personBuyLimit" gorm:"column:person_buy_limit;type:bigint;comment:产品用户购买有效上限"`
  19. RebateRatio decimal.Decimal `json:"rebateRatio" gorm:"column:rebate_ratio;type:decimal(25,2);comment:最近一层返佣比例"`
  20. DividendRatio decimal.Decimal `json:"dividendRatio" gorm:"column:dividend_ratio;type:decimal(25,8);comment:分红比例"`
  21. IsDisplay int8 `json:"isDisplay" gorm:"column:is_display;type:tinyint;comment:是否有效 1:开放展示 0:不开放展示"`
  22. Enable int8 `json:"enable" gorm:"column:enable;type:tinyint;comment:是否有效 1:开放购买 0:未开放购买"`
  23. }
  24. func (*NodeInfo) TableName() string {
  25. return "node_info"
  26. }
  27. func NewNodeInfo() *NodeInfo {
  28. return &NodeInfo{}
  29. }