102 lines
6.0 KiB
Go
102 lines
6.0 KiB
Go
package dto
|
|
|
|
// JSON:API Helicopter Usage DTOs
|
|
|
|
type HelicopterUsageAttributes struct {
|
|
HelicopterID string `json:"helicopter_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
|
TotalLanding float64 `json:"total_landing" example:"120"`
|
|
TotalAirframeHours float64 `json:"total_airframe_hours" example:"1523.5"`
|
|
TotalAirframeCycles float64 `json:"total_airframe_cycles" example:"320"`
|
|
TotalEngine1Hours float64 `json:"total_engine_1_hours" example:"1523.5"`
|
|
TotalEngine1GpcNgN1 float64 `json:"total_engine_1_gpc_ng_n1" example:"98.7"`
|
|
TotalEngine1PtcNfN2 float64 `json:"total_engine_1_ptc_nf_n2" example:"97.2"`
|
|
TotalEngine1Ccc float64 `json:"total_engine_1_ccc" example:"44"`
|
|
TotalEngine2Hours float64 `json:"total_engine_2_hours" example:"1523.5"`
|
|
TotalEngine2GpcNgN1 float64 `json:"total_engine_2_gpc_ng_n1" example:"98.7"`
|
|
TotalEngine2PtcNfN2 float64 `json:"total_engine_2_ptc_nf_n2" example:"97.2"`
|
|
TotalEngine2Ccc float64 `json:"total_engine_2_ccc" example:"44"`
|
|
TotalFlightReport float64 `json:"total_flight_report" example:"80"`
|
|
TotalHookRelease float64 `json:"total_hook_release" example:"10"`
|
|
TotalRotorBrakeCycle float64 `json:"total_rotor_brake_cycle" example:"8"`
|
|
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 HelicopterUsageResource struct {
|
|
Type string `json:"type" example:"helicopter_usage"`
|
|
ID string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
|
Attributes HelicopterUsageAttributes `json:"attributes"`
|
|
}
|
|
|
|
type HelicopterUsageResponse struct {
|
|
Data HelicopterUsageResource `json:"data"`
|
|
}
|
|
|
|
type HelicopterUsageListResponse struct {
|
|
Data []HelicopterUsageResource `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 HelicopterUsageCreateAttributes struct {
|
|
HelicopterID string `json:"helicopter_id" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
|
TotalLanding *float64 `json:"total_landing,omitempty" example:"120"`
|
|
TotalAirframeHours *float64 `json:"total_airframe_hours,omitempty" example:"1523.5"`
|
|
TotalAirframeCycles *float64 `json:"total_airframe_cycles,omitempty" example:"320"`
|
|
TotalEngine1Hours *float64 `json:"total_engine_1_hours,omitempty" example:"1523.5"`
|
|
TotalEngine1GpcNgN1 *float64 `json:"total_engine_1_gpc_ng_n1,omitempty" example:"98.7"`
|
|
TotalEngine1PtcNfN2 *float64 `json:"total_engine_1_ptc_nf_n2,omitempty" example:"97.2"`
|
|
TotalEngine1Ccc *float64 `json:"total_engine_1_ccc,omitempty" example:"44"`
|
|
TotalEngine2Hours *float64 `json:"total_engine_2_hours,omitempty" example:"1523.5"`
|
|
TotalEngine2GpcNgN1 *float64 `json:"total_engine_2_gpc_ng_n1,omitempty" example:"98.7"`
|
|
TotalEngine2PtcNfN2 *float64 `json:"total_engine_2_ptc_nf_n2,omitempty" example:"97.2"`
|
|
TotalEngine2Ccc *float64 `json:"total_engine_2_ccc,omitempty" example:"44"`
|
|
TotalFlightReport *float64 `json:"total_flight_report,omitempty" example:"80"`
|
|
TotalHookRelease *float64 `json:"total_hook_release,omitempty" example:"10"`
|
|
TotalRotorBrakeCycle *float64 `json:"total_rotor_brake_cycle,omitempty" example:"8"`
|
|
}
|
|
|
|
type HelicopterUsageCreateData struct {
|
|
Type string `json:"type" validate:"required,oneof=helicopter_usage_create helicopter_usage" example:"helicopter_usage_create"`
|
|
Attributes HelicopterUsageCreateAttributes `json:"attributes" validate:"required"`
|
|
}
|
|
|
|
type HelicopterUsageCreateRequest struct {
|
|
Data HelicopterUsageCreateData `json:"data" validate:"required"`
|
|
}
|
|
|
|
type HelicopterUsageUpdateAttributes struct {
|
|
HelicopterID *string `json:"helicopter_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
|
TotalLanding *float64 `json:"total_landing,omitempty" example:"120"`
|
|
TotalAirframeHours *float64 `json:"total_airframe_hours,omitempty" example:"1523.5"`
|
|
TotalAirframeCycles *float64 `json:"total_airframe_cycles,omitempty" example:"320"`
|
|
TotalEngine1Hours *float64 `json:"total_engine_1_hours,omitempty" example:"1523.5"`
|
|
TotalEngine1GpcNgN1 *float64 `json:"total_engine_1_gpc_ng_n1,omitempty" example:"98.7"`
|
|
TotalEngine1PtcNfN2 *float64 `json:"total_engine_1_ptc_nf_n2,omitempty" example:"97.2"`
|
|
TotalEngine1Ccc *float64 `json:"total_engine_1_ccc,omitempty" example:"44"`
|
|
TotalEngine2Hours *float64 `json:"total_engine_2_hours,omitempty" example:"1523.5"`
|
|
TotalEngine2GpcNgN1 *float64 `json:"total_engine_2_gpc_ng_n1,omitempty" example:"98.7"`
|
|
TotalEngine2PtcNfN2 *float64 `json:"total_engine_2_ptc_nf_n2,omitempty" example:"97.2"`
|
|
TotalEngine2Ccc *float64 `json:"total_engine_2_ccc,omitempty" example:"44"`
|
|
TotalFlightReport *float64 `json:"total_flight_report,omitempty" example:"80"`
|
|
TotalHookRelease *float64 `json:"total_hook_release,omitempty" example:"10"`
|
|
TotalRotorBrakeCycle *float64 `json:"total_rotor_brake_cycle,omitempty" example:"8"`
|
|
}
|
|
|
|
type HelicopterUsageUpdateData struct {
|
|
Type string `json:"type" validate:"required,oneof=helicopter_usage_update helicopter_usage" example:"helicopter_usage_update"`
|
|
ID string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
|
Attributes HelicopterUsageUpdateAttributes `json:"attributes" validate:"required"`
|
|
}
|
|
|
|
type HelicopterUsageUpdateRequest struct {
|
|
Data HelicopterUsageUpdateData `json:"data" validate:"required"`
|
|
}
|