package com.example.demo.product.dto;

import java.math.BigDecimal;
import java.util.List;

public class ProductDtos {

    public static class ProductListItem {
        public Long id;
        public String name;
        public String brand;
        public String model;
        public String spec;
        public BigDecimal stock; // from inventories.quantity
        public BigDecimal retailPrice; // from product_prices
        public String cover; // first image url
    }

    public static class ProductDetail {
        public Long id;
        public String name;
        public String barcode;
        public String brand;
        public String model;
        public String spec;
        public String origin;
        public Long categoryId;
        public Long unitId;
        public BigDecimal safeMin;
        public BigDecimal safeMax;
        public BigDecimal stock;
        public BigDecimal purchasePrice;
        public BigDecimal retailPrice;
        public BigDecimal wholesalePrice;
        public BigDecimal bigClientPrice;
        public List<Image> images;
    }

    public static class Image {
        public String url;
    }

    public static class CreateOrUpdateProductRequest {
        public String name;
        public String barcode;
        public String brand;
        public String model;
        public String spec;
        public String origin;
        public Long categoryId;
        public Long unitId;
        public BigDecimal safeMin;
        public BigDecimal safeMax;
        public Prices prices;
        public BigDecimal stock;
        public List<String> images;
        public String remark; // map to products.description
    }

    public static class Prices {
        public BigDecimal purchasePrice;
        public BigDecimal retailPrice;
        public BigDecimal wholesalePrice;
        public BigDecimal bigClientPrice;
    }
}







