package dto

import responsedto "wucher/internal/transport/http/dto/response"

type AfterFlightInspectionAttributes struct {
	ID                        string                                   `json:"id,omitempty" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
	FlightInspectionID        string                                   `json:"flight_inspection_id,omitempty" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
	FlightInspection          *FlightInspectionResource                `json:"flight_inspection,omitempty"`
	Helicopter                *responsedto.HelicopterResource          `json:"helicopter,omitempty"`
	MissionCode               string                                   `json:"mission_code,omitempty" example:"M-2026-001"`
	MissionType               []string                                 `json:"mission_type,omitempty"`
	TotalFlight               int                                      `json:"total_flight" example:"3"`
	FlightDataCount           int                                      `json:"flight_data_count" example:"2"`
	FlightTimeSeconds         int64                                    `json:"flight_time_seconds" example:"9000"`
	Route                     []string                                 `json:"route"`
	OilEngineNR1Checked       *string                                  `json:"oil_engine_nr1_checked" example:"1"`
	OilEngineNR2Checked       *string                                  `json:"oil_engine_nr2_checked" example:"1"`
	HydraulicLHChecked        *string                                  `json:"hydraulic_lh_checked" example:"1"`
	HydraulicRHChecked        *string                                  `json:"hydraulic_rh_checked" example:"1"`
	OilTransmissionMGBChecked *string                                  `json:"oil_transmission_mgb_checked" example:"1"`
	OilTransmissionIGBChecked *string                                  `json:"oil_transmission_igb_checked" example:"1"`
	OilTransmissionTGBChecked *string                                  `json:"oil_transmission_tgb_checked" example:"1"`
	Note                      *string                                  `json:"note" example:"All checks completed"`
	Total                     int                                      `json:"total" example:"3"`
	Completed                 int                                      `json:"completed" example:"1"`
	DoneFileChecklist         []AfterFlightInspectionFileChecklistItem `json:"done_file_checklist,omitempty"`
	FileChecklist             []AfterFlightInspectionFileChecklistItem `json:"file_checklist"`
	CreatedAt                 string                                   `json:"created_at,omitempty" example:"2026-04-09T05:00:00Z"`
	UpdatedAt                 string                                   `json:"updated_at,omitempty" example:"2026-04-09T05:00:00Z"`
}

type AfterFlightInspectionFileChecklistItem struct {
	HelicopterFileID string `json:"helicopter_file_id" example:"019d7000-aaaa-7bbb-8ccc-111111111111"`
	FileName         string `json:"file_name,omitempty" example:"After Flight Checklist.pdf"`
	DownloadURL      string `json:"download_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.pdf?X-Amz-Signature=..."`
	IsDone           bool   `json:"is_done" example:"false"`
}

type AfterFlightInspectionResource struct {
	Type       string                          `json:"type" example:"after_flight_inspection"`
	ID         string                          `json:"id,omitempty" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
	Attributes AfterFlightInspectionAttributes `json:"attributes"`
}

type AfterFlightInspectionResponse struct {
	Data AfterFlightInspectionResource `json:"data"`
}

type AfterFlightInspectionUpsertAttributes struct {
	OilEngineNR1Checked       *string `json:"oil_engine_nr1_checked,omitempty"`
	OilEngineNR2Checked       *string `json:"oil_engine_nr2_checked,omitempty"`
	HydraulicLHChecked        *string `json:"hydraulic_lh_checked,omitempty"`
	HydraulicRHChecked        *string `json:"hydraulic_rh_checked,omitempty"`
	OilTransmissionMGBChecked *string `json:"oil_transmission_mgb_checked,omitempty"`
	OilTransmissionIGBChecked *string `json:"oil_transmission_igb_checked,omitempty"`
	OilTransmissionTGBChecked *string `json:"oil_transmission_tgb_checked,omitempty"`
	Note                      *string `json:"note,omitempty"`
}

type AfterFlightInspectionUpsertData struct {
	Type       string                                `json:"type" validate:"required,oneof=after_flight_inspection_upsert after_flight_inspection"`
	Attributes AfterFlightInspectionUpsertAttributes `json:"attributes" validate:"required"`
}

type AfterFlightInspectionUpsertRequest struct {
	Data AfterFlightInspectionUpsertData `json:"data" validate:"required"`
}
