Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicModel ¶
type Example ¶
type Example struct { BasicModel Name string `json:"name"` // Name Status string `json:"status" gorm:"default:active"` // Status, active or inactive }
type Setting ¶
type Setting struct { BasicModel Key string `gorm:"primaryKey"` Value string `gorm:"not null"` Type SettingType `gorm:"not null"` Title string Description string }
Setting represents the settings table in the database
func (*Setting) MarshalJSON ¶
func (*Setting) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON data into the setting
type SettingType ¶
type SettingType int
const ( TypeString SettingType = iota TypeInt TypeFloat TypeBool TypeJSON )
type User ¶
type User struct { BasicModel Name datatypes.NullString `json:"name"` // Name Username datatypes.NullString `json:"username" gorm:"uniqueIndex"` // Username Password datatypes.NullString `json:"-"` // Password Phone datatypes.NullString `json:"phone" gorm:"uniqueIndex"` // Phone Email datatypes.NullString `json:"email" gorm:"uniqueIndex"` // Email EmailVerified bool `json:"email_verified"` LastLoginAt time.Time `json:"-"` // Last login time Dob datatypes.Date `json:"dob"` }
Click to show internal directories.
Click to hide internal directories.