package request

type FlightDataCreateAttributes struct {
	MissionID            string                                `json:"mission_id" validate:"required"`
	CoPilotID            *string                               `json:"co_pilot_id,omitempty"`
	FromICAOID           *string                               `json:"from_icao_id,omitempty"`
	FromHospitalID       *string                               `json:"from_hospital_id,omitempty"`
	ToICAOID             *string                               `json:"to_icao_id,omitempty"`
	ToHospitalID         *string                               `json:"to_hospital_id,omitempty"`
	FlightTakeOff        *string                               `json:"flight_take_off,omitempty"`
	FlightLanding        *string                               `json:"flight_landing,omitempty"`
	FlightDurationSecs   *int64                                `json:"flight_duration_seconds,omitempty"`
	FlightREDSecs        *int64                                `json:"flight_red_seconds,omitempty"`
	MaxN1                *float64                              `json:"max_n1,omitempty"`
	MaxN2                *float64                              `json:"max_n2,omitempty"`
	PaxCount             *int                                  `json:"pax_count,omitempty"`
	LandingCount         *int                                  `json:"landing_count,omitempty"`
	RotorBrakeCycle      *int                                  `json:"rotor_brake_cycle,omitempty"`
	HookReleases         *int                                  `json:"hook_releases,omitempty"`
	TicketNo             *string                               `json:"ticket_no,omitempty"`
	Engine               *string                               `json:"engine,omitempty"`
	DeliveryNoteNumber   *string                               `json:"delivery_note_number,omitempty"`
	CustomerName         *string                               `json:"customer_name,omitempty"`
	FlightPlanDistance   *float64                              `json:"flight_plan_distance,omitempty"`
	FlightPlanTimeSecs   *int64                                `json:"flight_plan_time_seconds,omitempty"`
	FlightPlanTrueCourse *float64                              `json:"flight_plan_true_course,omitempty"`
	FuelBeforeFlight     *float64                              `json:"fuel_before_flight,omitempty"`
	FuelUpload           *float64                              `json:"fuel_upload,omitempty"`
	FuelAfterFlight      *float64                              `json:"fuel_after_flight,omitempty"`
	FuelPlanning         *float64                              `json:"fuel_planning,omitempty"`
	FlightPositioning    *bool                                 `json:"flight_positioning,omitempty" example:"false"`
	HESLO                *FlightDataCreateSPOHESLOAttributes   `json:"heslo,omitempty"`
	Logging              *FlightDataCreateSPOLoggingAttributes `json:"logging,omitempty"`
	HEC                  *FlightDataCreateSPOHECAttributes     `json:"hec,omitempty"`
	OtherInformation     *string                               `json:"other_information,omitempty"`
}

type FlightDataCreateSPOHESLOAttributes struct {
	Flights []FlightDataCreateSPOHESLOFlight `json:"flights,omitempty"`
}

type FlightDataCreateSPOHESLOFlight struct {
	ROT int `json:"rot" example:"0"`
	// Facility category: heslo-rope-label.
	HESLORopeLabelID   string `json:"heslo_rope_label_id,omitempty" example:"string"`
	HESLORopeLabelName string `json:"heslo_rope_label_name,omitempty" example:"string"`
	// Facility category: heslo-rope-length.
	Slings []FlightDataCreateSPOHESLOSling `json:"slings,omitempty"`
}

type FlightDataCreateSPOHESLOSling struct {
	// Facility category: heslo-rope-length.
	SlingID   string `json:"sling_id,omitempty" example:"string"`
	SlingName string `json:"sling_name,omitempty" example:"string"`
}

type FlightDataCreateSPOLoggingAttributes struct {
	Slings []FlightDataCreateSPOLoggingSling `json:"slings,omitempty"`
}

type FlightDataCreateSPOLoggingSling struct {
	// Facility category: heslo-hook.
	SlingID   string `json:"sling_id,omitempty" example:"string"`
	SlingName string `json:"sling_name,omitempty" example:"string"`
}

type FlightDataCreateSPOHECAttributes struct {
	Flights []FlightDataCreateSPOHECFlight `json:"flights,omitempty"`
	Loads   []FlightDataCreateSPOHECLoad   `json:"loads,omitempty"`
	Slings  []FlightDataCreateSPOHECSling  `json:"slings,omitempty"`
}

type FlightDataCreateSPOHECFlight struct {
	// Facility category: hec-rope-label.
	EquipmentID   string `json:"equipment_id,omitempty" example:"string"`
	EquipmentName string `json:"equipment_name,omitempty" example:"string"`
	HECCycle      int    `json:"hec_cycle" example:"0"`
	ROT           int    `json:"rot" example:"0"`
}

type FlightDataCreateSPOHECLoad struct {
	// Weight band for the HEC load, e.g. "bis 199 kg", "200-600 kg", "600-800 kg", "800-1000 kg".
	LoadCategory string `json:"load_category,omitempty" example:"200-600 kg"`
	Quantity     int    `json:"quantity" example:"3"`
}

type FlightDataCreateSPOHECSling struct {
	// Facility category: hec-rope-length.
	SlingID   string `json:"sling_id,omitempty" example:"string"`
	SlingName string `json:"sling_name,omitempty" example:"string"`
}

type FlightDataCreateData struct {
	Type       string                     `json:"type" validate:"required,oneof=flight_data_create flight_data" example:"flight_data_create"`
	Attributes FlightDataCreateAttributes `json:"attributes" validate:"required"`
}

type FlightDataCreateRequest struct {
	Data FlightDataCreateData `json:"data" validate:"required"`
}

type FlightDataUpdateData struct {
	Type       string                     `json:"type" validate:"required,oneof=flight_data_update" example:"flight_data_update"`
	Attributes FlightDataCreateAttributes `json:"attributes" validate:"required"`
}

type FlightDataUpdateRequest struct {
	Data FlightDataUpdateData `json:"data" validate:"required"`
}

// FlightDataCreateSPOExampleRequest is used only for Swagger examples.
// Runtime parsing still uses FlightDataCreateRequest.
type FlightDataCreateSPOExampleRequest struct {
	Data FlightDataCreateSPOExampleData `json:"data"`
}

type FlightDataCreateSPOExampleData struct {
	Type       string                               `json:"type" example:"flight_data_create"`
	Attributes FlightDataCreateSPOExampleAttributes `json:"attributes"`
}

type FlightDataCreateSPOExampleAttributes struct {
	MissionID          string `json:"mission_id" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	CoPilotID          string `json:"co_pilot_id,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
	FlightTakeOff      string `json:"flight_take_off,omitempty" example:"2026-04-20T08:00:00Z"`
	FlightLanding      string `json:"flight_landing,omitempty" example:"2026-04-20T09:15:00Z"`
	FromICAOID         string `json:"from_icao_id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	ToICAOID           string `json:"to_icao_id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	HookReleases       int    `json:"hook_releases,omitempty" example:"0"`
	TicketNo           string `json:"ticket_no,omitempty" example:"SPO-001"`
	Engine             string `json:"engine,omitempty" example:"AIRBUS H145"`
	DeliveryNoteNumber string `json:"delivery_note_number,omitempty" example:"DN-2026-0001"`
	CustomerName       string `json:"customer_name,omitempty" example:"Patient Transfer"`
	OtherInformation   string `json:"other_information,omitempty" example:"SPO mission sample"`
}
