package chemo_protocol

import (
	"time"

	ecore "simrs-vx/internal/domain/base-entities/core"
	erc "simrs-vx/internal/domain/references/common"

	ec "simrs-vx/internal/domain/main-entities/chemo"
	ecp "simrs-vx/internal/domain/main-entities/chemo-plan"
	eus "simrs-vx/internal/domain/main-entities/user"
)

type ChemoProtocol struct {
	ecore.Main
	Chemo_Id           *uint                `json:"chemo_id"`
	Chemo              *ec.Chemo            `json:"chemo,omitempty" gorm:"foreignKey:Chemo_Id;references:Id"`
	Patient_Weight     *float32             `json:"patient_weight"`
	Patient_Height     *float32             `json:"patient_height"`
	Diagnoses          *string              `json:"diagnoses"`
	Duration           *uint                `json:"duration"`          // not used
	DurationUnit_Code  *erc.TimeUnitCode    `json:"durationUnit_code"` // not used
	Interval           *uint                `json:"interval"`
	Cycle              *uint                `json:"cycle"`  // total cycle
	Series             *uint16              `json:"series"` // total series
	StartDate          *time.Time           `json:"startDate"`
	EndDate            *time.Time           `json:"endDate"`
	Status_Code        erc.DataVerifiedCode `json:"status_code"`
	VerifiedAt         *time.Time           `json:"verifiedAt"`
	VerifiedBy_User_Id *uint                `json:"verifiedBy_user_id"`
	VerifiedBy         *eus.User            `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
	ChemoPlans         *[]ecp.ChemoPlan     `json:"chemoPlans,omitempty" gorm:"foreignKey:Protocol_Id;references:Id"`
	Patient_Id         *uint                `json:"patient_id"`
}
