package doctor

import (
	ecore "simrs-vx/internal/domain/base-entities/core"
	ee "simrs-vx/internal/domain/main-entities/employee"
	es "simrs-vx/internal/domain/main-entities/specialist"
	ess "simrs-vx/internal/domain/main-entities/subspecialist"
	eu "simrs-vx/internal/domain/main-entities/unit"
	"time"
)

type Doctor struct {
	ecore.Main                            // adjust this according to the needs
	Code               *string            `json:"code" gorm:"unique;size:20"`
	Employee_Id        *uint              `json:"employee_id"`
	Employee           *ee.Employee       `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
	IHS_Number         *string            `json:"ihs_number" gorm:"unique;size:20"`
	SIP_Number         *string            `json:"sip_number" gorm:"unique;size:20"`
	SIP_ExpiredDate    *time.Time         `json:"sip_expiredDate"`
	Unit_Code          *string            `json:"unit_code" gorm:"size:10"`
	Unit               *eu.Unit           `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
	Specialist_Code    *string            `json:"specialist_code" gorm:"size:10"`
	Specialist         *es.Specialist     `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
	Subspecialist_Code *string            `json:"subspecialist_code" gorm:"size:10"`
	Subspecialist      *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Code;references:Code"`
}
