package
Version:
v0.0.0-...-905bf1f
Opens a new window with list of versions in this module.
Published: Apr 2, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Ban struct {
ID int64 `gorm:"primaryKey;unique;not null"`
UserID int64 `gorm:"unique;not null"`
Reason string `gorm:"not null"`
BanAt time.Time `gorm:"not null"`
UnbanAt time.Time `gorm:"not null"`
}
type Role struct {
ID int64 `gorm:"primaryKey;unique;not null"`
UserID int64 `gorm:"not null"`
Type string `gorm:"not null"`
}
type User struct {
ID int64 `gorm:"primaryKey;unique;not null"`
Name string `gorm:"not null"`
Password string `gorm:"type:varchar(256);not null"`
Email string `gorm:"unique;not null"`
PhotoUrl string `gorm:"not null"`
Description string
Ban *Ban `gorm:"foreignKey:UserID;references:ID"`
Roles []*Role `gorm:"foreignKey:UserID;not null;references:ID"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.