package com.cf.imes.module.system.controller.admin.funds.products.vo.product;

import com.cf.imes.module.system.validation.products.ProductStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;

import java.math.BigDecimal;

@Schema(description = "管理后台 - 产品表 product新增/修改 Request VO")
@Data
public class ProductSaveReqVO {

    @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10725")
    private Long id;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "{product.save.productName.notEmpty}")
    @Size(max = 64, message = "{product.save.productName.size}")
    private String productName;

    @Schema(description = "产品建议价格")
    @NotNull(message = "{product.save.price.notNull}")
    @DecimalMin(value = "0.01", message = "{product.save.price.min}")
    @DecimalMax(value = "100000", message = "{product.save.price.max}")
    @Digits(integer = 6, fraction = 2, message = "{product.save.price.format}")
    private BigDecimal price;

    @Schema(description = "产品状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @ProductStatus
    private Integer status;

}
