package dto

// JSON:API Forces Present DTOs

type ForcesPresentAttributes struct {
	Name      string `json:"name" example:"Firefighter Team A"`
	SortKey   *int   `json:"sortkey" example:"1"`
	Note      string `json:"note,omitempty" example:"On-site responders"`
	IsActive  bool   `json:"is_active" example:"true"`
	CreatedAt string `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
	CreatedBy string `json:"created_by" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UpdatedAt string `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
	UpdatedBy string `json:"updated_by" 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"`
}

type ForcesPresentResource struct {
	Type       string                  `json:"type" example:"forces_present"`
	ID         string                  `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes ForcesPresentAttributes `json:"attributes"`
}

type ForcesPresentResponse struct {
	Data ForcesPresentResource `json:"data"`
}

type ForcesPresentListResponse struct {
	Data []ForcesPresentResource `json:"data"`
	Meta struct {
		PageNumber int   `json:"page_number" example:"1"`
		PageSize   int   `json:"page_size" example:"20"`
		Total      int64 `json:"total" example:"120"`
	} `json:"meta"`
}

type ForcesPresentDataTableResponse struct {
	Data []ForcesPresentResource `json:"data"`
	Meta struct {
		Draw            int   `json:"draw" example:"1"`
		RecordsTotal    int64 `json:"records_total" example:"120"`
		RecordsFiltered int64 `json:"records_filtered" example:"12"`
	} `json:"meta"`
}

type ForcesPresentCreateAttributes struct {
	Name     string  `json:"name" validate:"required" example:"Firefighter Team A"`
	SortKey  *int    `json:"sortkey" example:"1"`
	Note     *string `json:"note,omitempty" example:"On-site responders"`
	IsActive *bool   `json:"is_active,omitempty" example:"true"`
}

type ForcesPresentCreateData struct {
	Type       string                        `json:"type" validate:"required,oneof=forces_present_create forces_present" example:"forces_present_create"`
	Attributes ForcesPresentCreateAttributes `json:"attributes" validate:"required"`
}

type ForcesPresentCreateRequest struct {
	Data ForcesPresentCreateData `json:"data" validate:"required"`
}

type ForcesPresentUpdateAttributes struct {
	Name     *string `json:"name,omitempty" example:"Firefighter Team A"`
	SortKey  NullInt `json:"sortkey,omitempty" swaggertype:"integer" example:"1"`
	Note     *string `json:"note,omitempty" example:"On-site responders"`
	IsActive *bool   `json:"is_active,omitempty" example:"true"`
}

type ForcesPresentUpdateData struct {
	Type       string                        `json:"type" validate:"required,oneof=forces_present_update forces_present" example:"forces_present_update"`
	ID         string                        `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes ForcesPresentUpdateAttributes `json:"attributes" validate:"required"`
}

type ForcesPresentUpdateRequest struct {
	Data ForcesPresentUpdateData `json:"data" validate:"required"`
}
