package ambulance_transport_req

import (
	ecore "simrs-vx/internal/domain/base-entities/core"
	eds "simrs-vx/internal/domain/main-entities/district"
	ept "simrs-vx/internal/domain/main-entities/patient"
	epr "simrs-vx/internal/domain/main-entities/province"
	erg "simrs-vx/internal/domain/main-entities/regency"
	evl "simrs-vx/internal/domain/main-entities/village"
	"time"

	eren "simrs-vx/internal/domain/references/encounter"
	erp "simrs-vx/internal/domain/references/person"
)

type AmbulanceTransportReq struct {
	ecore.Main
	Patient_Id *uint        `json:"patient_id"`
	Patient    *ept.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"`

	Diagnoses   *string    `json:"diagnoses" gorm:"size:1024"`
	RequestDate *time.Time `json:"requestDate"`
	UsageDate   *time.Time `json:"usageDate"`

	Address *string `json:"address" gorm:"size:100"`
	RtRw    *string `json:"rtRw" gorm:"size:10"`

	Province_Code *string       `json:"province_code" gorm:"size:2"`
	Province      *epr.Province `json:"province,omitempty" gorm:"foreignKey:Province_Code;references:Code"`

	Regency_Code *string      `json:"regency_code" gorm:"size:4"`
	Regency      *erg.Regency `json:"regency,omitempty" gorm:"foreignKey:Regency_Code;references:Code"`

	District_Code *string       `json:"district_code" gorm:"size:6"`
	District      *eds.District `json:"district,omitempty" gorm:"foreignKey:District_Code;references:Code"`

	Village_Code *string      `json:"village_code" gorm:"size:10"`
	Village      *evl.Village `json:"village,omitempty" gorm:"foreignKey:Village_Code;references:Code"`

	Facility_Code             *eren.AmbulanceFacilityCode `json:"facility_code" gorm:"size:10"`
	Needs_Code                *eren.AmbulanceNeedsCode    `json:"needs_code" gorm:"size:10"`
	Contact_Name              *string                     `json:"contact_name" gorm:"size:100"`
	Contact_Relationship_Code *erp.RelationshipCode       `json:"contact_relationship_code" gorm:"size:10"`
	Contact_PhoneNumber       *string                     `json:"contact_phoneNumber" gorm:"size:20"`
}
