package specialist

import (
	ecore "simrs-vx/internal/domain/base-entities/core"
	eub "simrs-vx/internal/domain/main-entities/specialist-position/base"
	essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
	eu "simrs-vx/internal/domain/main-entities/unit"
)

type Specialist struct {
	ecore.SmallMain                  // adjust this according to the needs
	Code                string       `json:"code" gorm:"unique;size:20"`
	Name                string       `json:"name" gorm:"size:50"`
	Unit_Code           *string      `json:"unit_code" gorm:"size:20"`
	Unit                *eu.Unit     `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
	SpecialistPositions []eub.Basic  `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
	Subspecialists      []essb.Basic `json:"subspecialists,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
}
