init push
This commit is contained in:
91
internal/transport/http/dto/response/flight_response.go
Normal file
91
internal/transport/http/dto/response/flight_response.go
Normal file
@@ -0,0 +1,91 @@
|
||||
package response
|
||||
|
||||
type FlightAttributes struct {
|
||||
Status string `json:"status" example:"draft"`
|
||||
MissionID string `json:"mission_id,omitempty" example:"019e9640-f7af-7940-80e8-1e9a83013afb"`
|
||||
Code string `json:"code" example:"M-062226-001"`
|
||||
Date string `json:"date" example:"2026-04-14"`
|
||||
TotalDraft int `json:"total_draft" example:"6"`
|
||||
Takeover *FlightTakeoverSummary `json:"takeover,omitempty"`
|
||||
Steps []FlightStepItem `json:"steps"`
|
||||
Draft []FlightDraftGroup `json:"draft,omitempty"`
|
||||
CreatedAt string `json:"created_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
CreatedBy *UserRef `json:"created_by,omitempty"`
|
||||
UpdatedAt string `json:"updated_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
UpdatedBy *UserRef `json:"updated_by,omitempty"`
|
||||
DeletedAt string `json:"deleted_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
DeletedBy *UserRef `json:"deleted_by,omitempty"`
|
||||
}
|
||||
|
||||
type FlightStepItem struct {
|
||||
Phase string `json:"phase" example:"duty_roster"`
|
||||
Position string `json:"position,omitempty" example:"takeover"`
|
||||
Step int `json:"step,omitempty" example:"1"`
|
||||
Complete bool `json:"complete" example:"true"`
|
||||
ID string `json:"id,omitempty" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
|
||||
Status string `json:"status" example:"completed"`
|
||||
MissionType []FlightMissionTypeSummary `json:"mission_type,omitempty"`
|
||||
CompletedAt string `json:"completed_at" example:"2026-04-14T08:00:00Z"`
|
||||
CompletedBy string `json:"completed_by" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
}
|
||||
|
||||
type FlightHelicopterSummary struct {
|
||||
AOG bool `json:"aog" example:"false"`
|
||||
Designation string `json:"designation" example:"AIRBUS H145"`
|
||||
ID string `json:"id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
Identifier string `json:"identifier" example:"D-HYAR"`
|
||||
IsActive bool `json:"is_active" example:"true"`
|
||||
Type string `json:"type" example:"H145"`
|
||||
}
|
||||
|
||||
type FlightTakeoverSummary struct {
|
||||
ID string `json:"id,omitempty" example:"019e8713-aa19-7fb7-a510-a0332dc69697"`
|
||||
Helicopter *FlightHelicopterSummary `json:"helicopter,omitempty"`
|
||||
DailyInspection *FlightDailyInspectionSummary `json:"daily_inspection,omitempty"`
|
||||
RosterDetail *TakeoverDutyRosterDetailsResponse `json:"roster_detail,omitempty"`
|
||||
}
|
||||
|
||||
type FlightDailyInspectionSummary struct {
|
||||
ID string `json:"id" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
|
||||
Name string `json:"name" example:"Ganahl Stefan"`
|
||||
ShortName string `json:"short_name" example:"GAN"`
|
||||
Date string `json:"date" example:"17.04.2026"`
|
||||
UTCTime string `json:"utc_time" example:"10:57"`
|
||||
}
|
||||
|
||||
type FlightDraftItem struct {
|
||||
ID string `json:"id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
|
||||
Type string `json:"type" example:"HEMS"`
|
||||
Status string `json:"status" example:"draft"`
|
||||
FlightDataID string `json:"flight_data_id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a55"`
|
||||
}
|
||||
|
||||
type FlightDraftGroup struct {
|
||||
Type string `json:"type" example:"HEMS"`
|
||||
Items []FlightDraftItem `json:"items"`
|
||||
}
|
||||
|
||||
type FlightMissionTypeSummary struct {
|
||||
Type string `json:"type" example:"HEMS"`
|
||||
Draft int `json:"draft" example:"5"`
|
||||
Completed int `json:"completed" example:"0"`
|
||||
}
|
||||
|
||||
type FlightResource struct {
|
||||
Type string `json:"type" example:"flight"`
|
||||
ID string `json:"id" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
|
||||
Attributes FlightAttributes `json:"attributes"`
|
||||
}
|
||||
|
||||
type FlightResponse struct {
|
||||
Data FlightResource `json:"data"`
|
||||
}
|
||||
|
||||
type FlightListResponse struct {
|
||||
Data []FlightResource `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"`
|
||||
}
|
||||
Reference in New Issue
Block a user