package controlletter

import (
	"time"

	ecore "simrs-vx/internal/domain/base-entities/core"
	ed "simrs-vx/internal/domain/main-entities/doctor"
	ee "simrs-vx/internal/domain/main-entities/encounter"
	es "simrs-vx/internal/domain/main-entities/specialist"
	ess "simrs-vx/internal/domain/main-entities/subspecialist"
	eu "simrs-vx/internal/domain/main-entities/unit"
)

type ControlLetter struct {
	ecore.Main                            // adjust this according to the needs
	Encounter_Id       *uint              `json:"encounter_id"`
	Encounter          *ee.Encounter      `json:"encounter" gorm:"foreignKey:Encounter_Id;references:Id"`
	Unit_Code          *string            `json:"unit_code"`
	Unit               *eu.Unit           `json:"unit" gorm:"foreignKey:Unit_Code;references:Code"`
	Specialist_Code    *string            `json:"specialist_code"`
	Specialist         *es.Specialist     `json:"specialist" gorm:"foreignKey:Specialist_Code;references:Code"`
	Subspecialist_Code *string            `json:"subspecialist_code"`
	Subspecialist      *ess.Subspecialist `json:"subspecialist" gorm:"foreignKey:Subspecialist_Code;references:Code"`
	Doctor_Code        *string            `json:"doctor_code"`
	Doctor             *ed.Doctor         `json:"doctor" gorm:"foreignKey:Doctor_Code;references:Code"`
	Date               *time.Time         `json:"date"`
}
