package response

type FlightDataAttributes struct {
	Status                string                             `json:"status" example:"in_progress"`
	Mission               *FlightDataMissionRef              `json:"mission,omitempty"`
	RosterDetails         *TakeoverDutyRosterDetailsResponse `json:"roster_details,omitempty"`
	HESLO                 *FlightDataSPOHESLODetails         `json:"heslo,omitempty" extensions:"x-note=Only returned for SPO missions"`
	Logging               *FlightDataSPOLoggingDetails       `json:"logging,omitempty" extensions:"x-note=Only returned for SPO missions"`
	HEC                   *FlightDataSPOHECDetails           `json:"hec,omitempty" extensions:"x-note=Only returned for SPO missions"`
	CoPilot               *FlightDataCoPilotRef              `json:"co_pilot,omitempty"`
	From                  *FlightDataLocationRef             `json:"from,omitempty"`
	To                    *FlightDataLocationRef             `json:"to,omitempty"`
	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"`
	FlightDuration        int64                              `json:"flight_duration_seconds" example:"4500"`
	FlightRED             int64                              `json:"flight_red_seconds" example:"300"`
	MaxN1                 float64                            `json:"max_n1" example:"97.5"`
	MaxN2                 float64                            `json:"max_n2" example:"98.1"`
	PaxCount              int                                `json:"pax_count" example:"4"`
	LandingCount          int                                `json:"landing_count" example:"1"`
	RotorBrakeCycle       int                                `json:"rotor_brake_cycle" example:"1"`
	HookReleases          int                                `json:"hook_releases" example:"0"`
	TicketNo              string                             `json:"ticket_no,omitempty" example:"TKT-001"`
	Engine                string                             `json:"engine,omitempty" example:"PW207D1"`
	DeliveryNoteNumber    string                             `json:"delivery_note_number,omitempty" example:"DN-1001"`
	CustomerName          string                             `json:"customer_name,omitempty" example:"Air Service"`
	FlightPlanDistance    float64                            `json:"flight_plan_distance" example:"120.5"`
	FlightPlanTimeSeconds int64                              `json:"flight_plan_time_seconds" example:"4200"`
	FlightPlanTrueCourse  float64                            `json:"flight_plan_true_course" example:"182.3"`
	FuelBeforeFlight      float64                            `json:"fuel_before_flight" example:"420"`
	FuelUpload            float64                            `json:"fuel_upload" example:"100"`
	FuelAfterFlight       float64                            `json:"fuel_after_flight" example:"280"`
	FuelPlanning          float64                            `json:"fuel_planning" example:"390"`
	FlightPositioning     bool                               `json:"flight_positioning" example:"false"`
	OtherInformation      string                             `json:"other_information,omitempty"`
	CreatedAt             string                             `json:"created_at,omitempty" example:"2026-04-20T08:00:00Z"`
	CreatedBy             string                             `json:"created_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
	UpdatedAt             string                             `json:"updated_at,omitempty" example:"2026-04-20T08:00:00Z"`
	UpdatedBy             string                             `json:"updated_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
}

type FlightDataSPOHESLODetails struct {
	Flights []FlightDataSPOHESLOFlight `json:"flights"`
}

type FlightDataSPOHESLOFlight struct {
	ID  string `json:"id"`
	ROT int    `json:"rot"`
	// Facility category: heslo-rope-label.
	HESLORopeLabelID   string                    `json:"heslo_rope_label_id,omitempty"`
	HESLORopeLabelName string                    `json:"heslo_rope_label_name,omitempty"`
	Slings             []FlightDataSPOHESLOSling `json:"slings"`
}

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

type FlightDataSPOLoggingDetails struct {
	Slings []FlightDataSPOLoggingSling `json:"slings"`
}

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

type FlightDataSPOHECDetails struct {
	Flights []FlightDataSPOHECFlight `json:"flights"`
	Slings  []FlightDataSPOHECSling  `json:"slings"`
	Loads   []FlightDataSPOHECLoad   `json:"loads"`
}

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

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

type FlightDataSPOHECLoad struct {
	ID string `json:"id"`
	// 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 FlightDataMissionRef struct {
	ID   string `json:"id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	Type string `json:"type,omitempty" example:"HEMS"`
}

type FlightDataCoPilotRef struct {
	ID        string `json:"id,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
	FirstName string `json:"first_name,omitempty" example:"John"`
	LastName  string `json:"last_name,omitempty" example:"Doe"`
	Email     string `json:"email,omitempty" example:"john.doe@example.com"`
}

type FlightDataLocationRef struct {
	Type  string `json:"type,omitempty" example:"icao"`
	ID    string `json:"id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	Code  string `json:"code,omitempty" example:"WIII"`
	Name  string `json:"name,omitempty" example:"General Hospital"`
	Label string `json:"label,omitempty" example:"WIII"`
}

type FlightDataResource struct {
	Type       string               `json:"type" example:"flight_data"`
	ID         string               `json:"id" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	Attributes FlightDataAttributes `json:"attributes"`
}

type FlightDataResponse struct {
	Data FlightDataResource `json:"data"`
}

type FlightDataListResponse struct {
	Data []FlightDataResource `json:"data"`
	Meta struct {
		PageNumber int   `json:"page_number" example:"1"`
		PageSize   int   `json:"page_size" example:"20"`
		Total      int64 `json:"total" example:"1"`
	} `json:"meta"`
}
