Files
zineshop/models/user.go
2025-04-14 23:29:24 +02:00

19 lines
478 B
Go

package models
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"`
Password string `json:"password" binding:"required" gorm:"not null"`
Email string `json:"email" binding:"required,email" gorm:"unique;not null"`
IsAdmin bool `json:"isAdmin" gorm:"default:false;not null"`
}