fix: add new fields on subscribe plan, and change status type to number in subscribe
This commit is contained in:
@@ -10,7 +10,7 @@ type Subscribe struct {
|
||||
SubscribePlanID string `json:"subscribe_plan_id"`
|
||||
StartDate time.Time `json:"start_date"`
|
||||
EndDate *time.Time `json:"end_date"`
|
||||
Status string `json:"status"`
|
||||
Status int8 `json:"status"`
|
||||
AutoRenew bool `json:"auto_renew"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ type SubscribePlan struct {
|
||||
ID string `json:"id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Length int `json:"length"`
|
||||
Price float32 `json:"price"`
|
||||
Status int8 `json:"status"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
@@ -13,10 +16,16 @@ type SubscribePlan struct {
|
||||
type SubscribePlanUpdate struct {
|
||||
Code string `json:"code" validate:"required"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Length int `json:"length"`
|
||||
Price float32 `json:"price"`
|
||||
Status int8 `json:"status"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type SubscribePlanReq struct {
|
||||
Code string `json:"code" validate:"required"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Status int8 `json:"status"`
|
||||
Length int `json:"length"`
|
||||
Price float32 `json:"price"`
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ type UserLogin struct {
|
||||
|
||||
type UserSubsUpdate struct {
|
||||
ID string `json:"id"`
|
||||
Status string `json:"status"`
|
||||
Status int8 `json:"status"`
|
||||
SubscribePlanID string `json:"subscribe_plan_id"`
|
||||
AutoRenew bool `json:"auto_renew"`
|
||||
StartDate time.Time `json:"start_date"`
|
||||
|
||||
Reference in New Issue
Block a user