package dto

// JSON:API HEMS Operation Category DTOs

type HEMSOperationCategoryAttributes struct {
	Name      string `json:"name" example:"Firefighting"`
	Type      string `json:"type" example:"first"`
	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"`
}

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

type HEMSOperationCategoryResponse struct {
	Data HEMSOperationCategoryResource `json:"data"`
}

type HEMSOperationCategoryListResponse struct {
	Data []HEMSOperationCategoryResource `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 HEMSOperationCategoryDataTableResponse struct {
	Data []HEMSOperationCategoryResource `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 HEMSOperationCategoryCreateAttributes struct {
	Name string `json:"name" validate:"required" example:"Firefighting"`
	Type string `json:"type" validate:"required,oneof=first secondary misuse" example:"first"`
}

type HEMSOperationCategoryCreateData struct {
	Type       string                                `json:"type" validate:"required,oneof=hems_operation_category_create hems_operation_category" example:"hems_operation_category_create"`
	Attributes HEMSOperationCategoryCreateAttributes `json:"attributes" validate:"required"`
}

type HEMSOperationCategoryCreateRequest struct {
	Data HEMSOperationCategoryCreateData `json:"data" validate:"required"`
}

type HEMSOperationCategoryUpdateAttributes struct {
	Name *string `json:"name,omitempty" example:"Firefighting"`
	Type *string `json:"type,omitempty" validate:"omitempty,oneof=first secondary misuse" example:"first"`
}

type HEMSOperationCategoryUpdateData struct {
	Type       string                                `json:"type" validate:"required,oneof=hems_operation_category_update hems_operation_category" example:"hems_operation_category_update"`
	Attributes HEMSOperationCategoryUpdateAttributes `json:"attributes" validate:"required"`
}

type HEMSOperationCategoryUpdateRequest struct {
	Data HEMSOperationCategoryUpdateData `json:"data" validate:"required"`
}
