package dto

// JSON:API HEMS Operational Data DTOs

type HEMSOperationalDataFileAttributes struct {
	ID               string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FileAttachmentID string `json:"file_attachment_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type HEMSOperationalDataAttributes struct {
	Time              string                              `json:"time" example:"2026-03-12T03:04:05Z"`
	LandID            string                              `json:"land_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	VocationID        string                              `json:"vocation_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	ForcePresentIDs   []string                            `json:"force_present_ids,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	StateID           string                              `json:"state_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Location          string                              `json:"location" example:"123 Main St, Anytown, USA"`
	Postcode          string                              `json:"postcode,omitempty" example:"12345"`
	Notes             string                              `json:"notes" example:"Notes about the operational data"`
	Darkness          bool                                `json:"darkness"`
	FalseInformation  bool                                `json:"false_information"`
	Fog               bool                                `json:"fog"`
	Precipitation     bool                                `json:"precipitation"`
	MountainUse       bool                                `json:"mountain_use"`
	Wind              bool                                `json:"wind"`
	NFOSearch         bool                                `json:"nfo_search"`
	LandingSiteSearch bool                                `json:"landing_site_search"`
	Temperature       float64                             `json:"temperature" example:"23.5"`
	Altitude          float64                             `json:"altitude" example:"5.2"`
	TerrainIndex      string                              `json:"terrain_index" example:"Only helicopter landing"`
	RopeRecovery      bool                                `json:"rope_recovery"`
	NightFlight       bool                                `json:"night_flight"`
	InstrumentFlight  bool                                `json:"instrument_flight"`
	AdditionalInfo    string                              `json:"additional_info" example:"Additional information about the operational data"`
	Files             []HEMSOperationalDataFileAttributes `json:"files,omitempty"`
	CreatedAt         string                              `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
	CreatedBy         string                              `json:"created_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UpdatedAt         string                              `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	UpdatedBy         string                              `json:"updated_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	DeletedAt         string                              `json:"deleted_at,omitempty" example:"2026-03-12T03:04:05Z"`
	DeletedBy         string                              `json:"deleted_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type HEMSOperationalDataResource struct {
	Type       string                        `json:"type" example:"hems_operational_data"`
	ID         string                        `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes HEMSOperationalDataAttributes `json:"attributes"`
}

type HEMSOperationalDataResponse struct {
	Data HEMSOperationalDataResource `json:"data"`
}

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

type HEMSOperationalDataDataTableResponse struct {
	Data []HEMSOperationalDataResource `json:"data"`
	Meta struct {
		Draw            int   `json:"draw" example:"1"`
		RecordsTotal    int64 `json:"records_total" example:"120"`
		RecordsFiltered int64 `json:"records_filtered" example:"12"`
	} `json:"meta"`
}

type HEMSOperationalDataCreateAttributes struct {
	Time              string   `json:"time" validate:"required" example:"2026-03-12T03:04:05Z"`
	LandID            *string  `json:"land_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	VocationID        *string  `json:"vocation_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	ForcePresentIDs   []string `json:"force_present_ids,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	StateID           *string  `json:"state_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Location          string   `json:"location" validate:"required" example:"123 Main St, Anytown, USA"`
	Postcode          *string  `json:"postcode,omitempty" example:"12345"`
	Notes             *string  `json:"notes,omitempty" example:"Notes about the operational data"`
	Darkness          *bool    `json:"darkness,omitempty"`
	FalseInformation  *bool    `json:"false_information,omitempty"`
	Fog               *bool    `json:"fog,omitempty"`
	Precipitation     *bool    `json:"precipitation,omitempty"`
	MountainUse       *bool    `json:"mountain_use,omitempty"`
	Wind              *bool    `json:"wind,omitempty"`
	NFOSearch         *bool    `json:"nfo_search,omitempty"`
	LandingSiteSearch *bool    `json:"landing_site_search,omitempty"`
	Temperature       *float64 `json:"temperature,omitempty" example:"23.5"`
	Altitude          *float64 `json:"altitude,omitempty" example:"5.2"`
	TerrainIndex      *string  `json:"terrain_index,omitempty" example:"Only helicopter landing"`
	RopeRecovery      *bool    `json:"rope_recovery,omitempty"`
	NightFlight       *bool    `json:"night_flight,omitempty"`
	InstrumentFlight  *bool    `json:"instrument_flight,omitempty"`
	AdditionalInfo    *string  `json:"additional_info,omitempty" example:"Additional information about the operational data"`
	FileAttachmentIDs []string `json:"file_attachment_ids,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type HEMSOperationalDataCreateData struct {
	Type       string                              `json:"type" validate:"required,oneof=hems_operational_data_create hems_operational_data" example:"hems_operational_data_create"`
	Attributes HEMSOperationalDataCreateAttributes `json:"attributes" validate:"required"`
}

type HEMSOperationalDataCreateRequest struct {
	Data HEMSOperationalDataCreateData `json:"data" validate:"required"`
}

type HEMSOperationalDataUpdateAttributes struct {
	Time              *string   `json:"time,omitempty" example:"2026-03-12T03:04:05Z"`
	LandID            *string   `json:"land_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	VocationID        *string   `json:"vocation_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	ForcePresentIDs   *[]string `json:"force_present_ids,omitempty"`
	StateID           *string   `json:"state_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Location          *string   `json:"location,omitempty" example:"123 Main St, Anytown, USA"`
	Postcode          *string   `json:"postcode,omitempty" example:"12345"`
	Notes             *string   `json:"notes,omitempty" example:"Notes about the operational data"`
	Darkness          *bool     `json:"darkness,omitempty"`
	FalseInformation  *bool     `json:"false_information,omitempty"`
	Fog               *bool     `json:"fog,omitempty"`
	Precipitation     *bool     `json:"precipitation,omitempty"`
	MountainUse       *bool     `json:"mountain_use,omitempty"`
	Wind              *bool     `json:"wind,omitempty"`
	NFOSearch         *bool     `json:"nfo_search,omitempty"`
	LandingSiteSearch *bool     `json:"landing_site_search,omitempty"`
	Temperature       *float64  `json:"temperature,omitempty" example:"23.5"`
	Altitude          *float64  `json:"altitude,omitempty" example:"5.2"`
	TerrainIndex      *string   `json:"terrain_index,omitempty" example:"Only helicopter landing"`
	RopeRecovery      *bool     `json:"rope_recovery,omitempty"`
	NightFlight       *bool     `json:"night_flight,omitempty"`
	InstrumentFlight  *bool     `json:"instrument_flight,omitempty"`
	AdditionalInfo    *string   `json:"additional_info,omitempty" example:"Additional information about the operational data"`
	FileAttachmentIDs *[]string `json:"file_attachment_ids,omitempty"`
}

type HEMSOperationalDataUpdateData struct {
	Type       string                              `json:"type" validate:"required,oneof=hems_operational_data_update hems_operational_data" example:"hems_operational_data_update"`
	Attributes HEMSOperationalDataUpdateAttributes `json:"attributes" validate:"required"`
}

type HEMSOperationalDataUpdateRequest struct {
	Data HEMSOperationalDataUpdateData `json:"data" validate:"required"`
}
