Documentation
¶
Index ¶
- func WithFields(fields ...string) func(*gorm.DB) *gorm.DB
- func WithIDEq(id string) func(*gorm.DB) *gorm.DB
- func WithOrder(order string) func(*gorm.DB) *gorm.DB
- func WithRoleEq(role user.Role) func(*gorm.DB) *gorm.DB
- func WithStatusEq(status user.Status) func(*gorm.DB) *gorm.DB
- func WithUsernameLike(name string) func(*gorm.DB) *gorm.DB
- type FollowDevice
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FollowDevice ¶ added in v0.3.0
type User ¶
type User struct {
ID string `gorm:"primaryKey;type:char(32);index:,type:hash" json:"id"`
CreatedAt time.Time
UpdatedAt time.Time
Username string `gorm:"not null;uniqueIndex;type:varchar(32)"`
HashedPassword []byte `gorm:"not null"`
Role user.Role `gorm:"not null;default:0"`
Status user.Status `gorm:"not null;default:0"`
Email string `gorm:"type:varchar(64)"`
FollowDevices []*FollowDevice `gorm:"foreignKey:UserID;references:ID"`
FollowAllDevice sql.NullBool `gorm:"default:false"`
}
Click to show internal directories.
Click to hide internal directories.