This commit is contained in:
@@ -5,7 +5,8 @@ import "time"
|
||||
type Order struct {
|
||||
Id int64 `gorm:"primaryKey"`
|
||||
ParentId int64 `gorm:"type:bigint;default:null;comment:Parent Order Id"`
|
||||
UserId int64 `gorm:"type:bigint;not null;default:0;comment:User Id"`
|
||||
UserId int64 `gorm:"type:bigint;not null;default:0;comment:User Id"`
|
||||
SubscriptionUserId int64 `gorm:"type:bigint;not null;default:0;comment:Target user ID for subscription (0=same as UserId)"`
|
||||
OrderNo string `gorm:"type:varchar(255);not null;default:'';unique;comment:Order No"`
|
||||
Type uint8 `gorm:"type:tinyint(1);not null;default:1;comment:Order Type: 1: Subscribe, 2: Renewal, 3: ResetTraffic, 4: Recharge"`
|
||||
Quantity int64 `gorm:"type:bigint;not null;default:1;comment:Quantity"`
|
||||
@@ -22,8 +23,9 @@ type Order struct {
|
||||
TradeNo string `gorm:"type:varchar(255);default:null;comment:Trade No"`
|
||||
Status uint8 `gorm:"type:tinyint(1);not null;default:1;comment:Order Status: 1: Pending, 2: Paid, 3:Close, 4: Failed, 5:Finished;"`
|
||||
SubscribeId int64 `gorm:"type:bigint;not null;default:0;comment:Subscribe Id"`
|
||||
SubscribeToken string `gorm:"type:varchar(255);default:null;comment:Renewal Subscribe Token"`
|
||||
IsNew bool `gorm:"type:tinyint(1);not null;default:0;comment:Is New Order"`
|
||||
SubscribeToken string `gorm:"type:varchar(255);default:null;comment:Renewal Subscribe Token"`
|
||||
AppAccountToken string `gorm:"type:varchar(36);default:null;comment:Apple IAP App Account Token (UUID)"`
|
||||
IsNew bool `gorm:"type:tinyint(1);not null;default:0;comment:Is New Order"`
|
||||
CreatedAt time.Time `gorm:"<-:create;comment:Create Time"`
|
||||
UpdatedAt time.Time `gorm:"comment:Update Time"`
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@ const (
|
||||
FamilyMemberActive uint8 = 1
|
||||
FamilyMemberLeft uint8 = 2
|
||||
FamilyMemberRemoved uint8 = 3
|
||||
DefaultFamilyMaxSize int64 = 5
|
||||
DefaultFamilyMaxSize int64 = 2
|
||||
)
|
||||
|
||||
type UserFamily struct {
|
||||
Id int64 `gorm:"primaryKey"`
|
||||
OwnerUserId int64 `gorm:"uniqueIndex:uniq_owner_user_id;not null;comment:Owner User ID"`
|
||||
MaxMembers int64 `gorm:"not null;default:5;comment:Max members in family"`
|
||||
MaxMembers int64 `gorm:"not null;default:2;comment:Max members in family"`
|
||||
Status uint8 `gorm:"type:tinyint(1);not null;default:1;comment:Status: 1=active, 0=disabled"`
|
||||
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
|
||||
UpdatedAt time.Time `gorm:"comment:Update Time"`
|
||||
|
||||
Reference in New Issue
Block a user