package com.trade.service.trade.purchasecontract.dto;

import java.math.BigDecimal;

import com.trade.common.core.dto.BaseDTO;
import com.trade.common.validate.ValidatorGroup;

import javax.validation.constraints.NotBlank;

/**
 * 采购合同添加更新商品DTO
 *
 * @author hlb
 * @since 2024-09-07 16:23:02
 */
public class PurchaseCommodityUpsertDto extends BaseDTO {

    /**
     * 主键id
     */
    private Long id;
    /**
     * 销售商品id主键
     */
    @NotBlank(message = "销售商品id不能为空")
    private Long salesCommodityId;
    /**
     * 采购数量
     */
    @NotBlank(message = "采购数量不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private BigDecimal number;
    /**
     * 采购单价
     */
    @NotBlank(message = "采购数量不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private BigDecimal priceUnit;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSalesCommodityId() {
        return salesCommodityId;
    }

    public void setSalesCommodityId(Long salesCommodityId) {
        this.salesCommodityId = salesCommodityId;
    }

    public BigDecimal getNumber() {
        return number;
    }

    public void setNumber(BigDecimal number) {
        this.number = number;
    }

    public BigDecimal getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(BigDecimal priceUnit) {
        this.priceUnit = priceUnit;
    }
}
