package dto

// JSON:API InsurancePatientData DTOs

type InsurancePatientDataHealthInsuranceCompany struct {
	ID           string `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name         string `json:"name,omitempty" example:"ABC Insurance"`
	State        string `json:"state,omitempty" example:"Berlin"`
	Address      string `json:"address,omitempty" example:"Main Street 10"`
	MobileNumber string `json:"mobile_number,omitempty" example:"+4912345678"`
	Email        string `json:"email,omitempty" example:"info@abc-insurance.local"`
}

type InsurancePatientDataFederalState struct {
	ID   string `json:"id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name string `json:"name,omitempty" example:"Bayern"`
}

type InsurancePatientDataAttributes struct {
	HealthInsuranceCompaniesId string                                      `json:"health_insurance_companies_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FederalStateId             string                                      `json:"federal_state_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	HealthInsuranceCompany     *InsurancePatientDataHealthInsuranceCompany `json:"health_insurance_company,omitempty"`
	FederalState               *InsurancePatientDataFederalState           `json:"federal_state,omitempty"`
	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 InsurancePatientDataResource struct {
	Type       string                         `json:"type" example:"insurance_patient_data"`
	ID         string                         `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes InsurancePatientDataAttributes `json:"attributes"`
}

type InsurancePatientDataResponse struct {
	Data InsurancePatientDataResource `json:"data"`
}

type InsurancePatientDataListResponse struct {
	Data []InsurancePatientDataResource `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 InsurancePatientDataDataTableResponse struct {
	Data []InsurancePatientDataResource `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 InsurancePatientDataCreateAttributes struct {
	HealthInsuranceCompaniesId string `json:"health_insurance_companies_id" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FederalStateId             string `json:"federal_state_id" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type InsurancePatientDataCreateData struct {
	Type       string                               `json:"type" validate:"required,oneof=insurance_patient_data_create insurance_patient_data" example:"insurance_patient_data_create"`
	Attributes InsurancePatientDataCreateAttributes `json:"attributes" validate:"required"`
}

type InsurancePatientDataCreateRequest struct {
	Data InsurancePatientDataCreateData `json:"data" validate:"required"`
}

type InsurancePatientDataUpdateAttributes struct {
	HealthInsuranceCompaniesId *string `json:"health_insurance_companies_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FederalStateId             *string `json:"federal_state_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type InsurancePatientDataUpdateData struct {
	Type       string                               `json:"type" validate:"required,oneof=insurance_patient_data_update insurance_patient_data" example:"insurance_patient_data_update"`
	ID         string                               `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes InsurancePatientDataUpdateAttributes `json:"attributes" validate:"required"`
}

type InsurancePatientDataUpdateRequest struct {
	Data InsurancePatientDataUpdateData `json:"data" validate:"required"`
}
