package models import ( "database/sql" "time" "gorm.io/gorm" ) type User struct { gorm.Model Name string Email string `gorm:"unique"` Password string TotpSecret sql.NullString IsAdmin bool SkipWelcome bool } type UserRole struct { gorm.Model UserID uint User User RoleID uint Role Role SectionID uint Section Section } // TODO: Autoclean expired sessions type UserSavedSession struct { gorm.Model UserID uint User User UUID string Secret string Expiration time.Time }