refactor: project name and set default plan for new user
This commit is contained in:
@@ -2,13 +2,11 @@ package database
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Subscribe struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primaryKey" json:"id"`
|
||||
SubscribePlanID uuid.UUID `gorm:"type:uuid;not null" json:"subscribe_plan_id"`
|
||||
ID string `gorm:"primaryKey" json:"id"`
|
||||
SubscribePlanID string `gorm:"not null" json:"subscribe_plan_id"`
|
||||
StartDate time.Time `gorm:"default:CURRENT_TIMESTAMP"`
|
||||
EndDate time.Time `gorm:"default:null"`
|
||||
Status string `gorm:"default:'inactive'"`
|
||||
@@ -20,7 +18,7 @@ type Subscribe struct {
|
||||
}
|
||||
|
||||
type SubscribePlan struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primaryKey" json:"id"`
|
||||
ID string `gorm:"primaryKey" json:"id"`
|
||||
Code string `gorm:"not null" json:"code"`
|
||||
Name string `gorm:"not null" json:"name"`
|
||||
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP"`
|
||||
|
||||
Reference in New Issue
Block a user