package com.cf.imes.module.system.controller.admin.organ.vo.organ;

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 lombok.Data;

import java.math.BigDecimal;

@Schema(description = "管理后台 - 组织创建购买产品 Request VO")
@Data
public class OrganCreateProductPurchaseReqVO {
    @Schema(description = "产品编号", example = "1")
    @NotNull(message = "产品编号不能为空")
    private Long productId;

    @Schema(description = "产品购买金额，单位：元", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @NotNull(message = "产品购买金额不能为空")
    @DecimalMin(value = "0.01", message = "产品购买金额必须大于零")
    @DecimalMax(value = "100000", message = "产品购买金额不能超过十万")
    @Digits(integer = 6, fraction = 2, message = "产品购买金额格式不正确")
    private BigDecimal price;

    @Schema(description = "产品购买编号", example = "1")
    private Long purchaseId;
}
