Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { *gorm.Model ID uuid.UUID `gorm:"type:uuid;primaryKey"` FirstName string `gorm:"size:100;not null"` LastName string `gorm:"size:100"` Email string `gorm:"size:100;unique;not null"` Password string `gorm:"size:255"` PhoneNumber string `gorm:"size:20"` IsActive bool `gorm:"type:boolean"` Provider string `gorm:"size:20"` ProviderID string `gorm:"size:100"` }
User represents a user in the system. The struct fields are annotated with GORM tags to specify database constraints.
func (*User) BeforeCreate ¶
BeforeCreate is a GORM hook that is triggered before a new record is created in the database. It sets the ID field to a new UUID if it hasn't been set already.
Click to show internal directories.
Click to hide internal directories.