first commit
This commit is contained in:
14
models/user.go
Normal file
14
models/user.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package models
|
||||
|
||||
type User struct {
|
||||
Id uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"column:user_name" json:"user"`
|
||||
Email string `gorm:"column:email" json:"email"`
|
||||
Role string `gorm:"column:role" json:"role"`
|
||||
Password string `gorm:"column:password" json:"password"`
|
||||
Settings Settings `gorm:"type:json" json:"settings"`
|
||||
}
|
||||
|
||||
func (u *User) IsValid() bool {
|
||||
return u.Name != ""
|
||||
}
|
||||
Reference in New Issue
Block a user