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

import com.trade.common.validate.ValidatorGroup;
import com.trade.service.trade.salescontract.dto.ContractTermsDto;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 采购合同表基详细信息
 *
 * @author hlb
 * @since 2024-09-07 16:23:15
 */
public class PurchaseContractDetailDto extends PurchaseContractDto {

    /**
     * 采购合同商品明细列表
     */
    @Size(min = 1, message = "采购合同商品列表不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private List<PurchaseCommodityDto> commodityList;
    /**
     * 采购合同条款
     */
    @NotNull(message = "采购合同条款不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private ContractTermsDto contractTerms;

    public List<PurchaseCommodityDto> getCommodityList() {
        return commodityList;
    }

    public void setCommodityList(List<PurchaseCommodityDto> commodityList) {
        this.commodityList = commodityList;
    }

    public ContractTermsDto getContractTerms() {
        return contractTerms;
    }

    public void setContractTerms(ContractTermsDto contractTerms) {
        this.contractTerms = contractTerms;
    }
}
