package response

type DutyRosterShiftTime struct {
	ShiftStart string `json:"shift_start,omitempty" example:"06:00"`
	ShiftEnd   string `json:"shift_end,omitempty" example:"21:00"`
}

type DutyRosterShiftDate struct {
	DateStart string `json:"date_start,omitempty" example:"2026-03-16"`
	DateEnd   string `json:"date_end,omitempty" example:"2026-03-16"`
}

type DutyRosterCrew struct {
	ID          string               `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name        string               `json:"name,omitempty" example:"Hunter Wolfgang"`
	Role        string               `json:"role,omitempty" example:"doctor"`
	MobilePhone string               `json:"mobile_phone,omitempty" example:"+43-1234"`
	Email       string               `json:"email,omitempty" example:"doctor@example.com"`
	ShiftDate   *DutyRosterShiftDate `json:"shift_date,omitempty"`
	ShiftTime   *DutyRosterShiftTime `json:"shift_time,omitempty"`
}

type DutyRosterPilotCrew struct {
	ID               string               `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name             string               `json:"name,omitempty" example:"Hunter Wolfgang"`
	Role             string               `json:"role,omitempty" example:"pilot"`
	MobilePhone      string               `json:"mobile_phone,omitempty" example:"+43-1234"`
	Email            string               `json:"email,omitempty" example:"pilot@example.com"`
	ShiftDate        *DutyRosterShiftDate `json:"shift_date,omitempty"`
	CrewType         string               `json:"crew_type,omitempty" example:"main"`
	FlightInstructor *bool                `json:"flight_instructor,omitempty"`
	LineChecker      *bool                `json:"line_checker,omitempty"`
	Supervisor       *bool                `json:"supervisor,omitempty"`
	Examiner         *bool                `json:"examiner,omitempty"`
	CoPilot          *bool                `json:"co_pilot,omitempty"`
}

type DutyRosterDetailsResponse struct {
	Pilot       []DutyRosterPilotCrew `json:"pilot"`
	Doctor      []DutyRosterCrew      `json:"doctor"`
	Rescuer     []DutyRosterCrew      `json:"rescuer"`
	Helper      []DutyRosterCrew      `json:"helper"`
	OtherPerson []DutyRosterCrew      `json:"other_person"`
}

type DutyRosterBaseInfo struct {
	ID               string              `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Type             string              `json:"type,omitempty" example:"hems"`
	BaseName         string              `json:"base_name,omitempty" example:"Gallus 1 - Zurs Lech"`
	BaseAbbreviation string              `json:"base_abbreviation,omitempty" example:"G1"`
	ShiftTime        DutyRosterShiftTime `json:"shift_time,omitempty"`
}

type DutyRosterHelicopterSummary struct {
	ID          string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Designation string `json:"designation" example:"OE-XHZ"`
	Identifier  string `json:"identifier" example:"1234"`
	Type        string `json:"type" example:"EC-135"`
}

type DutyRosterAttributes struct {
	Bases      DutyRosterBaseInfo          `json:"bases"`
	FlightID   string                      `json:"flight_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Helicopter DutyRosterHelicopterSummary `json:"helicopter"`
	DutyDate   string                      `json:"duty_date,omitempty" example:"2026-03-16"`
	ShiftTime  DutyRosterShiftTime         `json:"shift_time"`
	Detail     DutyRosterDetailsResponse   `json:"roster_detail"`
	CreatedBy  string                      `json:"created_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"`
}

type DutyRosterResource struct {
	Type       string               `json:"type" example:"duty_roster"`
	ID         string               `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes DutyRosterAttributes `json:"attributes"`
}

type DutyRosterResponse struct {
	Data DutyRosterResource `json:"data"`
}

type DutyRosterListResponse struct {
	Data []DutyRosterResource `json:"data"`
	Meta struct {
		Total int `json:"total" example:"31"`
	} `json:"meta"`
}

type DutyRosterGetAllMeta struct {
	PageNumber      int    `json:"page_number"`
	PageSize        int    `json:"page_size"`
	RecordsTotal    int    `json:"records_total"`
	RecordsFiltered int    `json:"records_filtered"`
	From            string `json:"from"`
	To              string `json:"to"`
	Timezone        string `json:"timezone"`
	Total           int    `json:"total"`
}

type DutyRosterGetAllData struct {
	HEMS []DutyRosterBaseGroupResource `json:"hems_base"`
	Base []DutyRosterBaseGroupResource `json:"base"`
}

type DutyRosterGetAllResponse struct {
	Data DutyRosterGetAllData `json:"data"`
	Meta DutyRosterGetAllMeta `json:"meta"`
}

type DutyRosterAnyResource struct {
	Type       string         `json:"type"`
	ID         string         `json:"id,omitempty"`
	Attributes map[string]any `json:"attributes"`
}

type DutyRosterAnyResponse struct {
	Data DutyRosterAnyResource `json:"data"`
}

type DutyRosterAnyListResponse struct {
	Data []DutyRosterAnyResource `json:"data"`
	Meta struct {
		Total int `json:"total" example:"31"`
	} `json:"meta"`
}

type DutyRosterAnyDeleteResponse struct {
	Data DutyRosterAnyDeleteResource `json:"data"`
}

type DutyRosterAnyDeleteResource struct {
	Type       string                        `json:"type" example:"duty_roster_delete"`
	Attributes DutyRosterAnyDeleteAttributes `json:"attributes"`
}

type DutyRosterAnyDeleteAttributes struct {
	Deleted bool               `json:"deleted" example:"true"`
	ID      string             `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Base    DutyRosterBaseInfo `json:"base"`
}

type DutyRosterUnifiedDataTableResponse struct {
	Data DutyRosterGetAllData           `json:"data"`
	Meta DutyRosterUnifiedDataTableMeta `json:"meta"`
}

type DutyRosterUnifiedDataTableMeta struct {
	Draw            int    `json:"draw" example:"1"`
	RecordsTotal    int    `json:"records_total" example:"20"`
	RecordsFiltered int    `json:"records_filtered" example:"20"`
	PageNumber      int    `json:"page_number" example:"1"`
	PageSize        int    `json:"page_size" example:"20"`
	From            string `json:"from" example:"2026-03-01"`
	To              string `json:"to" example:"2026-03-31"`
	Timezone        string `json:"timezone" example:"UTC"`
	Total           int    `json:"total" example:"20"`
	TotalGroups     int    `json:"total_groups" example:"20"`
	TotalRosters    int    `json:"total_rosters" example:"45"`
	NonEmptyGroups  int    `json:"non_empty_groups" example:"18"`
}

type DutyRosterGroupRoster struct {
	ID         string                      `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FlightID   string                      `json:"flight_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	DutyDate   string                      `json:"duty_date,omitempty" example:"2026-03-16"`
	ShiftTime  DutyRosterShiftTime         `json:"shift_time"`
	Helicopter DutyRosterHelicopterSummary `json:"helicopter"`
	Detail     DutyRosterDetailsResponse   `json:"roster_detail"`
	CreatedBy  string                      `json:"created_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"`
}

type DutyRosterBaseGroupAttributes struct {
	Bases   DutyRosterBaseInfo      `json:"bases"`
	Rosters []DutyRosterGroupRoster `json:"rosters"`
}

type DutyRosterBaseGroupResource struct {
	Type       string                        `json:"type" example:"hems_base_roster_group"`
	Attributes DutyRosterBaseGroupAttributes `json:"attributes"`
}

type DutyRosterGroupedListResponse struct {
	Data []DutyRosterBaseGroupResource `json:"data"`
	Meta struct {
		From       string `json:"from,omitempty" example:"2026-03-16"`
		To         string `json:"to,omitempty" example:"2026-04-15"`
		TotalBases int    `json:"total_bases" example:"8"`
	} `json:"meta"`
}

type DutyRosterGroupedDataTableResponse struct {
	Data []DutyRosterBaseGroupResource `json:"data"`
	Meta struct {
		Draw            int `json:"draw" example:"1"`
		RecordsTotal    int `json:"records_total" example:"8"`
		RecordsFiltered int `json:"records_filtered" example:"8"`
	} `json:"meta"`
}

type DutyRosterDeletedCrewItem struct {
	ID        string `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	RosterID  string `json:"roster_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UserID    string `json:"user_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name      string `json:"name,omitempty" example:"Pilot One"`
	RoleCode  string `json:"role_code,omitempty" example:"pilot"`
	CrewType  string `json:"crew_type,omitempty" example:"main"`
	DateStart string `json:"date_start,omitempty" example:"2026-03-20"`
	DateEnd   string `json:"date_end,omitempty" example:"2026-03-22"`
}

type DutyRosterCrewDeleteAttributes struct {
	Deleted      bool                        `json:"deleted" example:"true"`
	DeletedCount int                         `json:"deleted_count" example:"1"`
	DeletedItems []DutyRosterDeletedCrewItem `json:"deleted_items"`
}

type DutyRosterCrewDeleteResource struct {
	Type       string                         `json:"type" example:"duty_roster_crew_delete"`
	Attributes DutyRosterCrewDeleteAttributes `json:"attributes"`
}

type DutyRosterCrewDeleteResponse struct {
	Data DutyRosterCrewDeleteResource `json:"data"`
}
