123456789101112131415161718192021222324252627282930313233343536 |
- package merchant
- import (
- "eta/eta_mini_ht_api/models"
- "time"
- )
- type OpenType string
- const (
- OpenTypeValid OpenType = "open"
- OpenTypeExpired OpenType = "expired"
- OpenTypeClose OpenType = "close"
- )
- // UserSubscriptionAccessFlow 用户订阅访问列表
- type UserSubscriptionAccessFlow struct {
- ID int `gorm:"column:id;primaryKey"`
- TemplateUserId int `gorm:"column:template_user_id"`
- ProductID int `gorm:"column:product_id"`
- ProductType string `gorm:"column:product_type"`
- ProductOrderId string `gorm:"column:product_order_id"`
- OpenType OpenType `gorm:"column:open_type;type:enum('open','expired','closed');default:'open'"`
- CreatedTime time.Time `gorm:"column:created_time"`
- UpdatedTime time.Time `gorm:"column:updated_time"`
- }
- func (UserSubscriptionAccessFlow) TableName() string {
- return "user_subscription_access_flow"
- }
- func CreateAccessFlow(userSubscriptionAccessFlow UserSubscriptionAccessFlow) (err error) {
- db := models.Main()
- err = db.Create(&userSubscriptionAccessFlow).Error
- return
- }
|