package request

// ActionSignoffSignAttributes — optional fields for the sign-off.
//   - ComplaintID: when set, the sign-off marks that complaint's corrective action as
//     signed off (the complaint must already have action_taken recorded, else 422).
//   - When ComplaintID is omitted it is a complaint-independent (fleet) sign-off, which
//     still allows an EASA release.
type ActionSignoffSignAttributes struct {
	// Sign toggles the sign-off: true (or omitted) signs it, false unsigns (clears the
	// signature). Combine with complaint_id to toggle a specific complaint's sign-off.
	Sign        *bool   `json:"sign,omitempty" example:"true"`
	ComplaintID *string `json:"complaint_id,omitempty" example:"019d6772-471c-7b70-b42a-d94020ef61e4"`
	// FlightID — REQUIRED for the fleet (complaint-independent) sign-off; scopes it to a
	// flight so it no longer leaks across takeovers of the same aircraft. Ignored when
	// complaint_id is set (that sign-off is keyed by the complaint).
	FlightID *string `json:"flight_id,omitempty" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
}

type ActionSignoffSignData struct {
	Type       string                      `json:"type,omitempty" example:"action_signoff"`
	Attributes ActionSignoffSignAttributes `json:"attributes"`
}

// ActionSignoffSignRequest — body is OPTIONAL for the sign endpoint.
type ActionSignoffSignRequest struct {
	Data ActionSignoffSignData `json:"data"`
}
