package com.pressing.modules.catalog.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;

public final class CatalogDtos {

    private CatalogDtos() {
    }

    public record ArticleTypeRequest(@NotBlank String label, String description, Boolean active) {
    }

    public record ArticleTypeResponse(Long id, String label, String description, boolean active) {
    }



    public record ArticleRequest(
        @NotNull Long articleTypeId,
        @NotBlank String label,
        Boolean active
        ) {
        }

        public record ArticleResponse(
                Long id,
                Long articleTypeId,
                String articleTypeLabel,
                String label,
                boolean active
        ) {
        }

    public record ColorRequest(@NotBlank String label, String hexCode, Boolean active) {
    }

    public record ColorResponse(Long id, String label, String hexCode, boolean active) {
    }



    public record LocationRequest(
        @NotBlank String rowCode,
        @NotBlank String label,
        Boolean active
) {}

public record LocationResponse(
        Long id,
        String rowCode,
        String label,
        boolean active
) {}

    public record ServiceRequest(
        @NotBlank(message = "Le code est obligatoire") 
        String code,
        
        @NotBlank(message = "Le libellé est obligatoire") 
        String label,
        
        String description,
        
        Boolean active
) {
}

public record ServiceResponse(
        Long id,
        String code,
        String label,
        String description,
        boolean active
) {
}

    public record PricingRequest(
            @NotNull Long serviceId,
            @NotNull Long articleTypeId,
            @NotNull BigDecimal unitPrice
    ) {
    }

    public record PricingResponse(
            Long id,
            Long serviceId,
            String serviceLabel,
            Long articleTypeId,
            String articleTypeLabel,
            BigDecimal unitPrice
    ) {
    }
}
