add org structure

This commit is contained in:
andrusyakka
2023-07-05 18:44:22 +03:00
parent ac08cceda0
commit 9234b577bb
8 changed files with 57 additions and 11 deletions

View File

@@ -5,9 +5,12 @@ import "gorm.io/gorm"
type (
User struct {
gorm.Model
UserName string `json:"userName" gorm:"unique"`
Password string `json:"password,omitempty"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
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"`
}
)