init push
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package shared
|
||||
|
||||
type AirRescuerChecklistBaseInfo struct {
|
||||
ID string `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
BaseName string `json:"base_name,omitempty" example:"Gallus 1 - Zurs Lech"`
|
||||
BaseAbbreviation string `json:"base_abbreviation,omitempty" example:"G1"`
|
||||
BaseCategory string `json:"base_category,omitempty" example:"hems"`
|
||||
}
|
||||
|
||||
type AirRescuerChecklistItemInput struct {
|
||||
Name string `json:"name" validate:"required" example:"Oxygen supply check"`
|
||||
Position *int `json:"position,omitempty" example:"1"`
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package shared
|
||||
|
||||
type FileManagerAttachmentAttributes struct {
|
||||
FileID string `json:"file_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
RefType string `json:"ref_type" example:"helicopter"`
|
||||
RefID string `json:"ref_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
Category string `json:"category,omitempty" example:"document"`
|
||||
SortOrder int `json:"sort_order" example:"0"`
|
||||
IsPrimary bool `json:"is_primary" example:"false"`
|
||||
AttachedBy string `json:"attached_by,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
CreatedAt string `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
UpdatedAt string `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
}
|
||||
104
internal/transport/http/dto/shared/file_manager_file_shared.go
Normal file
104
internal/transport/http/dto/shared/file_manager_file_shared.go
Normal file
@@ -0,0 +1,104 @@
|
||||
package shared
|
||||
|
||||
type FileManagerFileAttributes struct {
|
||||
FileUUID string `json:"file_uuid,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
FolderID string `json:"folder_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
Name string `json:"name" example:"policy.pdf"`
|
||||
NameNormalized string `json:"name_normalized,omitempty" example:"policy.pdf"`
|
||||
Extension string `json:"extension,omitempty" example:"pdf"`
|
||||
SizeBytes int64 `json:"size_bytes" example:"1024"`
|
||||
MimeType string `json:"mime_type" example:"application/pdf"`
|
||||
IsTemplate bool `json:"is_template" example:"true"`
|
||||
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=..."`
|
||||
Status string `json:"status" example:"validated"`
|
||||
FailureReason string `json:"failure_reason,omitempty" example:""`
|
||||
UploadError string `json:"upload_error,omitempty" example:""`
|
||||
ProcessingStartedAt string `json:"processing_started_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
ProcessedAt string `json:"processed_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
ValidatedAt string `json:"validated_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
FailedAt string `json:"failed_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
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"`
|
||||
TrashedAt string `json:"trashed_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
PurgeAt string `json:"purge_at,omitempty" example:"2026-04-12T03:04:05Z"`
|
||||
}
|
||||
|
||||
type FileManagerFileListAttributes struct {
|
||||
Name string `json:"name" example:"policy.pdf"`
|
||||
NameNormalized string `json:"name_normalized,omitempty" example:"policy.pdf"`
|
||||
Extension string `json:"extension,omitempty" example:"pdf"`
|
||||
SizeBytes int64 `json:"size_bytes" example:"1024"`
|
||||
MimeType string `json:"mime_type" example:"application/pdf"`
|
||||
IsTemplate bool `json:"is_template" example:"true"`
|
||||
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=..."`
|
||||
Status string `json:"status" example:"ready"`
|
||||
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"`
|
||||
}
|
||||
|
||||
type FileManagerFileLocationAttributes struct {
|
||||
FolderID string `json:"folder_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
}
|
||||
|
||||
type FileManagerFileProcessingAttributes struct {
|
||||
ProcessingStartedAt string `json:"processing_started_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
ProcessedAt string `json:"processed_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
ValidatedAt string `json:"validated_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
FailedAt string `json:"failed_at,omitempty" example:"2026-03-12T03:04:05Z"`
|
||||
FailureReason string `json:"failure_reason,omitempty" example:"processing validation failed"`
|
||||
}
|
||||
|
||||
type FileManagerFileAuditAttributes struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
type FileManagerFileDetailAttributes struct {
|
||||
Name string `json:"name" example:"policy.pdf"`
|
||||
NameNormalized string `json:"name_normalized,omitempty" example:"policy.pdf"`
|
||||
Extension string `json:"extension,omitempty" example:"pdf"`
|
||||
SizeBytes int64 `json:"size_bytes" example:"1024"`
|
||||
MimeType string `json:"mime_type" example:"application/pdf"`
|
||||
IsTemplate bool `json:"is_template" example:"true"`
|
||||
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=..."`
|
||||
PreviewURL string `json:"preview_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.preview.pdf?X-Amz-Signature=..."`
|
||||
Status string `json:"status" example:"ready"`
|
||||
Location *FileManagerFileLocationAttributes `json:"location,omitempty"`
|
||||
Processing *FileManagerFileProcessingAttributes `json:"processing,omitempty"`
|
||||
Audit FileManagerFileAuditAttributes `json:"audit"`
|
||||
}
|
||||
|
||||
type FileManagerFileDownloadAttributes struct {
|
||||
URL string `json:"url" example:"https://s3.localhost.localstack.cloud:4566/..."`
|
||||
ExpiresInSecond int64 `json:"expires_in_second" example:"900"`
|
||||
}
|
||||
|
||||
type FileManagerFileUploadIntentAttributes struct {
|
||||
UploadIntentID string `json:"upload_intent_uuid" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
UploadURL string `json:"upload_url" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/..."`
|
||||
Method string `json:"method" example:"PUT"`
|
||||
RequiredHeaders map[string]string `json:"required_headers,omitempty"`
|
||||
Object FileUploadObject `json:"object"`
|
||||
File FileUploadFile `json:"file"`
|
||||
ExpiresAt string `json:"expires_at" example:"2026-04-05T07:29:34Z"`
|
||||
ExpiresInSeconds int64 `json:"expires_in_seconds" example:"900"`
|
||||
}
|
||||
|
||||
type FileUploadObject struct {
|
||||
Bucket string `json:"bucket" example:"wucher-file-dev"`
|
||||
Key string `json:"key" example:"files/2026/04/05/018f3a5c7a6f7c2a8d4a4b5b1f6c8e9d.pdf"`
|
||||
}
|
||||
|
||||
type FileUploadFile struct {
|
||||
Name string `json:"name" example:"policy-final.pdf"`
|
||||
MimeType string `json:"mime_type" example:"application/pdf"`
|
||||
SizeBytes int64 `json:"size_bytes" example:"1024"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package shared
|
||||
|
||||
type FileManagerFolderAttributes struct {
|
||||
ParentID string `json:"parent_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
Name string `json:"name" example:"operations"`
|
||||
NameNormalized string `json:"name_normalized,omitempty" example:"operations"`
|
||||
Depth int `json:"depth" example:"1"`
|
||||
PathCache string `json:"path_cache,omitempty" example:"/root/operations"`
|
||||
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"`
|
||||
PurgeAt string `json:"purge_at,omitempty" example:"2026-04-12T03:04:05Z"`
|
||||
}
|
||||
|
||||
type FileManagerFolderLocationAttributes struct {
|
||||
ParentID string `json:"parent_id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
}
|
||||
|
||||
type FileManagerFolderAuditAttributes struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
type FileManagerFolderDetailAttributes struct {
|
||||
Name string `json:"name" example:"operations"`
|
||||
NameNormalized string `json:"name_normalized,omitempty" example:"operations"`
|
||||
Depth *int `json:"depth,omitempty" example:"1"`
|
||||
PathCache string `json:"path_cache,omitempty" example:"/root/operations"`
|
||||
Location *FileManagerFolderLocationAttributes `json:"location,omitempty"`
|
||||
Audit FileManagerFolderAuditAttributes `json:"audit"`
|
||||
}
|
||||
174
internal/transport/http/dto/shared/fleet_status_shared.go
Normal file
174
internal/transport/http/dto/shared/fleet_status_shared.go
Normal file
@@ -0,0 +1,174 @@
|
||||
package shared
|
||||
|
||||
type FleetStatusHelicopter struct {
|
||||
ID string `json:"id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
Designation string `json:"designation,omitempty" example:"AIRBUS H145"`
|
||||
Identifier string `json:"identifier,omitempty" example:"D-HEMS"`
|
||||
Type string `json:"type,omitempty" example:"EC-135"`
|
||||
Status string `json:"status,omitempty" example:"available" enums:"available,booked,aog,mcf"`
|
||||
// FlightID — id of the aircraft's current active flight (present only when it is in
|
||||
// use / booked). The fleet page uses it to create an EASA release scoped to the flight.
|
||||
FlightID string `json:"flight_id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
|
||||
StatusReasons []FleetStatusHelicopterReason `json:"status_reasons,omitempty"`
|
||||
}
|
||||
|
||||
// FleetStatusMCF is the helicopter's maintenance check flight shown on the fleet page.
|
||||
// When the helicopter has no MCF yet, id is empty and sign is false. af_hours /
|
||||
// landing_count are the SIGNED check-flight values — present only once the MCF is signed.
|
||||
type FleetStatusMCF struct {
|
||||
// Active — true when the helicopter is currently in MCF (an open draft, or a signed
|
||||
// but failed MCF still needing a re-flight); false when cleared/cancelled/none.
|
||||
Active bool `json:"active"`
|
||||
ID string `json:"id"`
|
||||
Date *string `json:"date"`
|
||||
// AFHours / LandingCount present only once the MCF is signed; omitted for none/draft/cancelled.
|
||||
AFHours *string `json:"af_hours,omitempty"`
|
||||
LandingCount *int `json:"landing_count,omitempty"`
|
||||
// Sign — true once the MCF is completed/signed; false while it is still a draft.
|
||||
Sign bool `json:"sign"`
|
||||
// SignedBy / SignedByName / SignedByShort — who signed (completed) the MCF; empty while unsigned.
|
||||
SignedBy string `json:"signed_by,omitempty"`
|
||||
SignedByName *string `json:"signed_by_name,omitempty"`
|
||||
SignedByShort *string `json:"signed_by_short,omitempty"`
|
||||
}
|
||||
|
||||
type MaintenanceScheduleAttributes struct {
|
||||
InspectionType string `json:"inspection_type" example:"A/F"`
|
||||
Type string `json:"type" example:"100H"`
|
||||
Due string `json:"due" validate:"omitempty,hours_or_date" example:"1200"`
|
||||
Ext string `json:"ext" validate:"omitempty,hours_or_date" example:"1300"`
|
||||
}
|
||||
|
||||
type FleetStatusFileAttributes struct {
|
||||
FileID string `json:"file_id" validate:"required" example:"019d6773-ccca-71dd-b9c7-8e6f531deb90"`
|
||||
Category string `json:"category" validate:"required,oneof=wb bfi" example:"wb"`
|
||||
// IsMandatory — when true, this file must be checked (is_done) during takeover.
|
||||
IsMandatory *bool `json:"is_mandatory,omitempty" example:"true"`
|
||||
}
|
||||
|
||||
type FleetStatusSummaryAirframe struct {
|
||||
Hours *float64 `json:"hours"`
|
||||
Cycles *float64 `json:"cycles"`
|
||||
}
|
||||
|
||||
type FleetStatusSummaryEngine struct {
|
||||
Hours *float64 `json:"hours"`
|
||||
GpcNgN1 *float64 `json:"gpc_ng_n1"`
|
||||
PtcNfN2 *float64 `json:"ptc_nf_n2"`
|
||||
Ccc *float64 `json:"ccc"`
|
||||
}
|
||||
|
||||
type FleetStatusSummary struct {
|
||||
Airframe FleetStatusSummaryAirframe `json:"airframe"`
|
||||
Engine1 FleetStatusSummaryEngine `json:"engine_1"`
|
||||
Engine2 FleetStatusSummaryEngine `json:"engine_2"`
|
||||
Landings *float64 `json:"landings"`
|
||||
FlightReports *float64 `json:"flight_reports"`
|
||||
RotorBrakeCycles *float64 `json:"rotor_brake_cycles"`
|
||||
HookReleases *float64 `json:"hook_releases"`
|
||||
}
|
||||
|
||||
type FleetStatusServiceLogAttributes struct {
|
||||
FleetStatusID string `json:"fleet_status_id" example:"019d6773-ccca-71dd-b9c7-8e6f531deb90"`
|
||||
HelicopterID string `json:"helicopter_id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
Helicopter *FleetStatusHelicopter `json:"helicopter,omitempty"`
|
||||
FleetStatusStatus string `json:"fleet_status_status,omitempty" example:"serviced"`
|
||||
InspectionType string `json:"inspection_type" example:"A/F"`
|
||||
Type string `json:"type" example:"100H"`
|
||||
Due string `json:"due" example:"1200 FH"`
|
||||
Ext string `json:"ext" example:"1300 FH"`
|
||||
ServicedAt string `json:"serviced_at" example:"2026-05-29T07:43:06Z"`
|
||||
CreatedAt string `json:"created_at" example:"2026-05-29T07:43:06Z"`
|
||||
CreatedBy string `json:"created_by" example:"John Doe"`
|
||||
}
|
||||
|
||||
const (
|
||||
ReasonCodeManualAOG = "manual_aog"
|
||||
ReasonCodeMELExpired = "mel_expired"
|
||||
ReasonCodeNonMELPending = "non_mel_pending"
|
||||
ReasonCodeInspectionOverdue = "inspection_overdue"
|
||||
)
|
||||
|
||||
type FleetStatusComplaint struct {
|
||||
ID string `json:"id"`
|
||||
FlightID string `json:"flight_id,omitempty"`
|
||||
Description string `json:"description"`
|
||||
Status string `json:"status" enums:"active_non_mel,active_mel,serviced"`
|
||||
ReportedAt string `json:"reported_at"`
|
||||
ReportedBy string `json:"reported_by,omitempty"`
|
||||
ReportedByName string `json:"reported_by_name,omitempty"`
|
||||
ReportedByShort string `json:"reported_by_short,omitempty"`
|
||||
AircraftHoursAtReport *string `json:"aircraft_hours_at_report,omitempty"`
|
||||
MEL FleetStatusComplaintMEL `json:"mel"`
|
||||
NSR FleetStatusComplaintNSR `json:"nsr"`
|
||||
Action FleetStatusComplaintAction `json:"action"`
|
||||
}
|
||||
|
||||
type FleetStatusComplaintMEL struct {
|
||||
Severity int8 `json:"severity" enums:"0,1,2,3,4"`
|
||||
SeverityLabel *string `json:"severity_label"`
|
||||
ClassifiedAt *string `json:"classified_at,omitempty"`
|
||||
ClassifiedBy string `json:"classified_by,omitempty"`
|
||||
ClassifiedByName string `json:"classified_by_name,omitempty"`
|
||||
ClassifiedByShort string `json:"classified_by_short,omitempty"`
|
||||
Deadline *string `json:"deadline,omitempty"`
|
||||
}
|
||||
|
||||
type FleetStatusComplaintNSR struct {
|
||||
IsNSR bool `json:"is_nsr"`
|
||||
DecidedAt *string `json:"decided_at,omitempty"`
|
||||
DecidedBy string `json:"decided_by,omitempty"`
|
||||
DecidedByName string `json:"decided_by_name,omitempty"`
|
||||
DecidedByShort string `json:"decided_by_short,omitempty"`
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
type FleetStatusComplaintAction struct {
|
||||
Taken *string `json:"taken"`
|
||||
SignedAt *string `json:"signed_at,omitempty"`
|
||||
SignedBy string `json:"signed_by,omitempty"`
|
||||
SignedByName string `json:"signed_by_name,omitempty"`
|
||||
SignedByShort string `json:"signed_by_short,omitempty"`
|
||||
AircraftHoursAtFix *string `json:"aircraft_hours_at_fix,omitempty"`
|
||||
}
|
||||
|
||||
type FleetStatusEASARelease struct {
|
||||
ID string `json:"id"`
|
||||
IsSigned bool `json:"is_signed"`
|
||||
EASADate *string `json:"easa_date,omitempty"`
|
||||
EASAACHours *string `json:"easa_ac_hours,omitempty"`
|
||||
EASALocation *string `json:"easa_location,omitempty"`
|
||||
EASAWONo *string `json:"easa_wo_no,omitempty"`
|
||||
EASAMaintManualRevAirframe *string `json:"easa_maint_manual_rev_airframe,omitempty"`
|
||||
EASAMaintManualRevEngine *string `json:"easa_maint_manual_rev_engine,omitempty"`
|
||||
EASASignerID *string `json:"easa_signer_id,omitempty"`
|
||||
EASAPermitNo *string `json:"easa_permit_no,omitempty"`
|
||||
SignedAt *string `json:"signed_at,omitempty"`
|
||||
SignedBy string `json:"signed_by,omitempty"`
|
||||
SignedByName string `json:"signed_by_name,omitempty"`
|
||||
SignedByShort string `json:"signed_by_short,omitempty"`
|
||||
MissingSignFields []string `json:"missing_sign_fields,omitempty"`
|
||||
}
|
||||
|
||||
func MELLabel(severity int8) string {
|
||||
switch severity {
|
||||
case 1:
|
||||
return "A"
|
||||
case 2:
|
||||
return "B"
|
||||
case 3:
|
||||
return "C"
|
||||
case 4:
|
||||
return "D"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
type FleetStatusHelicopterReason struct {
|
||||
Code string `json:"code" enums:"manual_aog,mel_expired,non_mel_pending,inspection_overdue"`
|
||||
Detail string `json:"detail"`
|
||||
Since *string `json:"since,omitempty"`
|
||||
ComplaintID string `json:"complaint_id,omitempty"`
|
||||
ScheduleID string `json:"schedule_id,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package shared
|
||||
|
||||
type FlightInspectionFileChecklistAttributes struct {
|
||||
IsDone bool `json:"is_done" example:"false"`
|
||||
HelicopterFileID string `json:"helicopter_file_id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
FlightInspectionID string `json:"flight_inspection_id" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
|
||||
CreatedAt string `json:"created_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
CreatedBy string `json:"created_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
UpdatedAt string `json:"updated_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
UpdatedBy string `json:"updated_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
}
|
||||
18
internal/transport/http/dto/shared/helicopter_file_shared.go
Normal file
18
internal/transport/http/dto/shared/helicopter_file_shared.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package shared
|
||||
|
||||
type HelicopterFileAttributes struct {
|
||||
Section string `json:"section" example:"bfi"`
|
||||
Position int `json:"position" example:"1"`
|
||||
IsMandatory bool `json:"is_mandatory" example:"true"`
|
||||
IsTemplate bool `json:"is_template" example:"true"`
|
||||
HelicopterID string `json:"helicopter_id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
HelicopterName string `json:"helicopter_name,omitempty" example:"AIRBUS H145"`
|
||||
FileAttachmentID string `json:"file_attachment_id" example:"019d6771-6c8e-7a2d-a7b8-03bcb65fcb3e"`
|
||||
AttachmentPending bool `json:"attachment_pending" example:"true"`
|
||||
FileName string `json:"file_name,omitempty" example:"Before 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=..."`
|
||||
CreatedAt string `json:"created_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
CreatedBy string `json:"created_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
UpdatedAt string `json:"updated_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
UpdatedBy string `json:"updated_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
}
|
||||
45
internal/transport/http/dto/shared/helicopter_shared.go
Normal file
45
internal/transport/http/dto/shared/helicopter_shared.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package shared
|
||||
|
||||
// Helicopter nested value objects reused as building blocks by helicopter
|
||||
// response DTOs (and available to any other module that embeds helicopter
|
||||
// summaries).
|
||||
|
||||
type HelicopterLastDailyInspection struct {
|
||||
InspectionID string `json:"inspection_id,omitempty" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
|
||||
Status string `json:"status" example:"inspected_cleared"`
|
||||
Inspector HelicopterLastDailyInspector `json:"inspector"`
|
||||
Base HelicopterLastDailyBase `json:"base"`
|
||||
InspectedAt string `json:"inspected_at,omitempty" example:"2026-05-25T07:47:00Z"`
|
||||
UTCTime string `json:"utc_time,omitempty" example:"07:47"`
|
||||
InspectionFilesChecklist HelicopterInspectionFilesChecklist `json:"inspection_files_checklist"`
|
||||
}
|
||||
|
||||
type HelicopterLastDailyInspector struct {
|
||||
ID string `json:"id,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
Name string `json:"name,omitempty" example:"Teodora Lesmana"`
|
||||
LicenseNo string `json:"license_no,omitempty" example:"4521"`
|
||||
}
|
||||
|
||||
type HelicopterLastDailyBase struct {
|
||||
ID string `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
BaseAbbreviation string `json:"base_abbreviation,omitempty" example:"G1"`
|
||||
BaseName string `json:"base_name,omitempty" example:"Gallus 1 - Zurs Lech"`
|
||||
Type string `json:"type,omitempty" example:"hems"`
|
||||
}
|
||||
|
||||
type HelicopterInspectionFilesChecklist struct {
|
||||
Completed int `json:"completed" example:"47"`
|
||||
Total int `json:"total" example:"47"`
|
||||
}
|
||||
|
||||
type HelicopterFoto struct {
|
||||
UUID string `json:"uuid" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
DownloadURL string `json:"download_url" example:"https://storage.example.com/helicopter/foto.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900&X-Amz-Signature=abc123"`
|
||||
ThumbnailDownloadURL string `json:"thumbnail_download_url,omitempty" example:"https://storage.example.com/helicopter/foto.thumb.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=900&X-Amz-Signature=abc123"`
|
||||
OriginalSizeBytes *int64 `json:"original_size_bytes,omitempty" example:"1024000"`
|
||||
}
|
||||
|
||||
type HelicopterAuditUser struct {
|
||||
ID string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
|
||||
Name string `json:"name" example:"John Doe"`
|
||||
}
|
||||
120
internal/transport/http/dto/shared/reserve_ac_shared.go
Normal file
120
internal/transport/http/dto/shared/reserve_ac_shared.go
Normal file
@@ -0,0 +1,120 @@
|
||||
package shared
|
||||
|
||||
import "time"
|
||||
|
||||
type ReserveAcAttributes struct {
|
||||
Status string `json:"status" example:"pending"`
|
||||
AircraftID string `json:"helicopter_id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
Aircraft *ReserveAcAircraftSummary `json:"helicopter,omitempty"`
|
||||
LastDaily *ReserveAcLastDailyInfo `json:"last_daily_inspection,omitempty"`
|
||||
FlightID string `json:"flight_id,omitempty" example:"019d6773-ccca-71dd-b9c7-8e6f531deb90"`
|
||||
Inspection *ReserveAcInspectionSummary `json:"inspection,omitempty"`
|
||||
CreatedAt string `json:"created_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
CreatedBy string `json:"created_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
UpdatedAt string `json:"updated_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
UpdatedBy string `json:"updated_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
DeletedAt string `json:"deleted_at,omitempty" example:"2026-04-14T08:00:00Z"`
|
||||
DeletedBy string `json:"deleted_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
|
||||
}
|
||||
|
||||
type ReserveAcLastDailyInfo struct {
|
||||
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 ReserveAcAircraftSummary struct {
|
||||
ID string `json:"id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
|
||||
Designation string `json:"designation" example:"AIRBUS H145"`
|
||||
Identifier string `json:"identifier" example:"D-HYAR"`
|
||||
Type string `json:"type" example:"H145"`
|
||||
AOG bool `json:"aog" example:"false"`
|
||||
IsActive bool `json:"is_active" example:"true"`
|
||||
}
|
||||
|
||||
type ReserveAcInspectionSummary struct {
|
||||
ID string `json:"id" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
|
||||
InspectionDate string `json:"inspection_date,omitempty" example:"2026-04-15"`
|
||||
Before ReserveAcBeforeSectionDTO `json:"before"`
|
||||
Prepare ReserveAcPrepareSectionDTO `json:"prepare"`
|
||||
FleetStatusFile ReserveAcFleetStatusFileSectionDTO `json:"fleet_status_file"`
|
||||
}
|
||||
|
||||
type ReserveAcBeforeSectionDTO struct {
|
||||
Total int `json:"total" example:"3"`
|
||||
Completed int `json:"completed" example:"1"`
|
||||
DoneFiles []ReserveAcFileChecklistItemDTO `json:"done_file_checklist,omitempty"`
|
||||
Fields *ReserveAcBeforeInspectionFields `json:"fields,omitempty"`
|
||||
FileChecklist []ReserveAcFileChecklistItemDTO `json:"file_checklist"`
|
||||
}
|
||||
|
||||
type ReserveAcPrepareSectionDTO struct {
|
||||
Total int `json:"total" example:"3"`
|
||||
Completed int `json:"completed" example:"1"`
|
||||
DoneFiles []ReserveAcFileChecklistItemDTO `json:"done_file_checklist,omitempty"`
|
||||
PrepareFields *ReserveAcPrepareFields `json:"prepare_fields,omitempty"`
|
||||
FileChecklist []ReserveAcFileChecklistItemDTO `json:"file_checklist"`
|
||||
}
|
||||
|
||||
type ReserveAcFleetStatusFileSectionDTO struct {
|
||||
Total int `json:"total" example:"2"`
|
||||
Completed int `json:"completed" example:"1"`
|
||||
DoneFiles []ReserveAcFileChecklistItemDTO `json:"done_file_checklist,omitempty"`
|
||||
FileChecklist []ReserveAcFileChecklistItemDTO `json:"file_checklist"`
|
||||
}
|
||||
|
||||
type ReserveAcFileChecklistItemDTO struct {
|
||||
HelicopterFileID string `json:"helicopter_file_id" example:"019d7000-aaaa-7bbb-8ccc-111111111111"`
|
||||
FileAttachmentID string `json:"file_attachment_id,omitempty" example:"019d7000-aaaa-7bbb-8ccc-222222222222"`
|
||||
FileName string `json:"file_name,omitempty" example:"Before 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"`
|
||||
IsMandatory bool `json:"is_mandatory" example:"true"`
|
||||
}
|
||||
|
||||
type ReserveAcBeforeInspectionFields struct {
|
||||
OilEngineNR1Checked *bool `json:"oil_engine_nr1_checked,omitempty"`
|
||||
OilEngineNR2Checked *bool `json:"oil_engine_nr2_checked,omitempty"`
|
||||
HydraulicLHChecked *bool `json:"hydraulic_lh_checked,omitempty"`
|
||||
HydraulicRHChecked *bool `json:"hydraulic_rh_checked,omitempty"`
|
||||
OilTransmissionMGBChecked *bool `json:"oil_transmission_mgb_checked,omitempty"`
|
||||
OilTransmissionIGBChecked *bool `json:"oil_transmission_igb_checked,omitempty"`
|
||||
OilTransmissionTGBChecked *bool `json:"oil_transmission_tgb_checked,omitempty"`
|
||||
FuelAmount *float64 `json:"fuel_amount,omitempty"`
|
||||
FuelUnit string `json:"fuel_unit,omitempty"`
|
||||
FuelAddedAmount *float64 `json:"fuel_added_amount,omitempty"`
|
||||
Note *string `json:"note,omitempty"`
|
||||
}
|
||||
|
||||
type ReserveAcPrepareFields struct {
|
||||
NotamBriefing *bool `json:"notam_briefing,omitempty"`
|
||||
WeatherBriefing *bool `json:"weather_briefing,omitempty"`
|
||||
OperationalFlightPlan *bool `json:"operational_flight_plan,omitempty"`
|
||||
}
|
||||
|
||||
type LastDailyInspection struct {
|
||||
ID []byte
|
||||
Name string
|
||||
ShortName string
|
||||
At time.Time
|
||||
}
|
||||
|
||||
type LastDailyInspectionSummary struct {
|
||||
InspectionID string
|
||||
Status string
|
||||
|
||||
InspectorID string
|
||||
InspectorName string
|
||||
InspectorLicenseNo string
|
||||
|
||||
BaseID string
|
||||
BaseName string
|
||||
BaseAbbreviation string
|
||||
BaseType string
|
||||
|
||||
InspectedAt time.Time
|
||||
|
||||
InspectionFilesChecklistCompleted int
|
||||
InspectionFilesChecklistTotal int
|
||||
}
|
||||
Reference in New Issue
Block a user