Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Namespace string
Namespace puts all tables names under a common namespace. This is useful if you want to use the same database for several services and don't want table names to collide.
Functions ¶
func AutoMigrate ¶
Types ¶
type Subscription ¶
type Subscription struct { ID string `gorm:"unique;primary",json:"id"` Type string `json:"type"` User *User `json:"user,omitempty"` UserID string `json:"user_id,omitempty"` RemoteID string `json:"remote_id"` Plan string `json:"plan"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"-"` }
func (*Subscription) BeforeCreate ¶
func (s *Subscription) BeforeCreate(scope *gorm.Scope) error
func (Subscription) TableName ¶
func (Subscription) TableName() string
Click to show internal directories.
Click to hide internal directories.