21 lines
462 B
Go
21 lines
462 B
Go
package model
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type (
|
|
User struct {
|
|
gorm.Model
|
|
ID uuid.UUID
|
|
UserName string `json:"user_name" gorm:"unique;index"`
|
|
Password string `json:"password,omitempty"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
Role string `json:"role" gorm:"default:employee"`
|
|
PositionID uint `json:"-"`
|
|
Position Position `gorm:"-:migration"`
|
|
}
|
|
)
|