first commmit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type User struct {
|
||||
gorm.Model `json:"-"`
|
||||
Username string `gorm:"unique;not null" binding:"required"`
|
||||
Password string `gorm:"not null" json:"-" binding:"required,min=8"`
|
||||
Role string `gorm:"default:'Рабочий'" json:"role"`
|
||||
FirstName string `json:"first_name" binding:"required"`
|
||||
LastName string `gorm:"index" json:"last_name" binding:"required"`
|
||||
Phone string `gorm:"index" json:"phone"`
|
||||
}
|
||||
Reference in New Issue
Block a user