package response

type EASAReleaseAttributes struct {
	HelicopterID               string  `json:"helicopter_id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
	ComplaintID                string  `json:"complaint_id,omitempty" example:"019d6774-1111-7fba-9ef4-3795c0da8a13"`
	FlightID                   string  `json:"flight_id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	EASADate                   *string `json:"easa_date,omitempty" example:"2026-06-16"`
	EASAACHours                *string `json:"easa_ac_hours,omitempty" example:"1245.3"`
	EASALocation               *string `json:"easa_location,omitempty" example:"LOWI"`
	EASAWONo                   *string `json:"easa_wo_no,omitempty" example:"WO-2026-001"`
	EASAMaintManualRevAirframe *string `json:"easa_maint_manual_rev_airframe,omitempty" example:"Rev 12"`
	EASAMaintManualRevEngine   *string `json:"easa_maint_manual_rev_engine,omitempty" example:"Rev 8"`
	// EASASignerID — contact id (UUIDv7) of the signer/technician.
	EASASignerID *string `json:"easa_signer_id,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
	// EASASignerName / EASASignerShort — resolved display name + 3-letter short of the signer contact.
	EASASignerName  *string `json:"easa_signer_name,omitempty" example:"John Doe"`
	EASASignerShort *string `json:"easa_signer_short,omitempty" example:"JDO"`
	EASAPermitNo    *string `json:"easa_permit_no,omitempty" example:"145.A.50"`
	// IsSigned — true once the release is signed (Release to Service); then the complaint becomes fixed.
	IsSigned bool `json:"is_signed" example:"false"`
	// SignedAt / SignedBy — when/who signed; empty until signed.
	SignedAt *string `json:"signed_at,omitempty" example:"2026-06-16T03:04:05Z"`
	SignedBy string  `json:"signed_by,omitempty" example:"019d61db-53c6-7280-87ec-e65f205c6d3b"`
	// MissingSignFields — required fields still empty; must all be filled before it can be signed.
	MissingSignFields []string `json:"missing_sign_fields,omitempty"`
	CreatedAt         string   `json:"created_at" example:"2026-06-16T03:04:05Z"`
	UpdatedAt         string   `json:"updated_at" example:"2026-06-16T03:04:05Z"`
}

type EASAReleaseResource struct {
	Type       string                `json:"type" example:"easa_release"`
	ID         string                `json:"id" example:"019d6771-5fb5-7337-837f-bc5ed85181a1"`
	Attributes EASAReleaseAttributes `json:"attributes"`
}

type EASAReleaseResponse struct {
	Data EASAReleaseResource `json:"data"`
}

// EASAReleaseDeleteResponse is the ack returned when an EASA release is voided/deleted.
type EASAReleaseDeleteResponse struct {
	Data struct {
		Type       string `json:"type" example:"easa_release_delete"`
		Attributes struct {
			Deleted bool `json:"deleted" example:"true"`
		} `json:"attributes"`
	} `json:"data"`
}

type EASAReleaseListResponse struct {
	Data []EASAReleaseResource `json:"data"`
	Meta struct {
		Total int64 `json:"total" example:"1"`
	} `json:"meta"`
}
