Add token repositorie
This commit is contained in:
@@ -4,9 +4,15 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type RegisterToken struct {
|
||||
gorm.Model
|
||||
Token string `json:"token" binding:"required" gorm:"unique;not null"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
Name string `json:"name" binding:"required" gorm:"unique;not null"`
|
||||
Name string `json:"name" binding:"required" gorm:"unique;not null"`
|
||||
Password string `json:"password" binding:"required" gorm:"not null"`
|
||||
Email string `json:"email" binding:"required,email" gorm:"unique;not null"`
|
||||
Email string `json:"email" binding:"required,email" gorm:"unique;not null"`
|
||||
IsAdmin bool `json:"isAdmin" gorm:"default:false;not null"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user