package request

import shared "wucher/internal/transport/http/dto/shared"

type FleetStatusMarkServicedAttributes struct {
	ServicedAt string `json:"serviced_at,omitempty" example:"2026-05-29T07:43:06Z"`
}

type FleetStatusMarkServicedData struct {
	Type       string                            `json:"type" validate:"required,oneof=fleet_status_mark_serviced fleet_status" example:"fleet_status_mark_serviced"`
	Attributes FleetStatusMarkServicedAttributes `json:"attributes"`
}

type FleetStatusMarkServicedRequest struct {
	Data FleetStatusMarkServicedData `json:"data" validate:"required"`
}

type FleetStatusCreateAttributes struct {
	HelicopterID         string                                 `json:"helicopter_id" validate:"required" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
	MaintenanceSchedules []shared.MaintenanceScheduleAttributes `json:"maintenance_schedules" validate:"omitempty,dive"`
	Files                []shared.FleetStatusFileAttributes     `json:"files"`
}

type FleetStatusCreateData struct {
	Type       string                      `json:"type" validate:"required,oneof=fleet_status_create fleet_status" example:"fleet_status_create"`
	Attributes FleetStatusCreateAttributes `json:"attributes" validate:"required"`
}

type FleetStatusCreateRequest struct {
	Data FleetStatusCreateData `json:"data" validate:"required"`
}

type FleetStatusUpdateAttributes struct {
	HelicopterID         *string                                `json:"helicopter_id,omitempty"`
	MaintenanceSchedules []shared.MaintenanceScheduleAttributes `json:"maintenance_schedules" validate:"omitempty,dive"`
	Files                []shared.FleetStatusFileAttributes     `json:"files"`
	Summary              *FleetStatusSummaryUpdate              `json:"summary,omitempty"`
}

type FleetStatusSummaryUpdate struct {
	Airframe         *FleetStatusSummaryAirframeUpdate `json:"airframe,omitempty"`
	Engine1          *FleetStatusSummaryEngineUpdate   `json:"engine_1,omitempty"`
	Engine2          *FleetStatusSummaryEngineUpdate   `json:"engine_2,omitempty"`
	Landings         *float64                          `json:"landings,omitempty" example:"120"`
	FlightReports    *float64                          `json:"flight_reports,omitempty" example:"80"`
	RotorBrakeCycles *float64                          `json:"rotor_brake_cycles,omitempty" example:"8"`
	HookReleases     *float64                          `json:"hook_releases,omitempty" example:"10"`
}

type FleetStatusSummaryAirframeUpdate struct {
	Hours  *float64 `json:"hours,omitempty" example:"6610.5"`
	Cycles *float64 `json:"cycles,omitempty" example:"320"`
}

type FleetStatusSummaryEngineUpdate struct {
	Hours   *float64 `json:"hours,omitempty" example:"8001.7"`
	GpcNgN1 *float64 `json:"gpc_ng_n1,omitempty" example:"98.7"`
	PtcNfN2 *float64 `json:"ptc_nf_n2,omitempty" example:"97.2"`
	Ccc     *float64 `json:"ccc,omitempty" example:"44"`
}

type FleetStatusUpdateData struct {
	Type       string                      `json:"type" validate:"required,oneof=fleet_status_update fleet_status" example:"fleet_status_update"`
	ID         string                      `json:"id" example:"019d6773-ccca-71dd-b9c7-8e6f531deb90"`
	Attributes FleetStatusUpdateAttributes `json:"attributes" validate:"required"`
}

type FleetStatusUpdateRequest struct {
	Data FleetStatusUpdateData `json:"data" validate:"required"`
}
