package com.zfire.mall.manager.bean.manage.product.price;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.zfire.mall.manager.plus.entity.ProductUpdPriceBillItemWallet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel
@JsonIgnoreProperties(value = { "isPublish" }
        , allowGetters = true)
public class ProductUpdPriceBillItemBean {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "产品调价单id")
    private String updPriceBillId;

    @NotBlank(message = "销售类型不能空")
    @ApiModelProperty(value = "销售类型id")
    private String saleTypeId;

    //@NotNull(message = "销售类型编码不能空")
    @ApiModelProperty(value = "销售类型编码")
    private String saleTypeCode;

    //@NotNull(message = "销售类型名称不能空")
    @ApiModelProperty(value = "销售类型名称")
    private String saleTypeName;

    @ApiModelProperty(value = "品类code")
    private String mainId;

    @ApiModelProperty(value = "品类名称")
    private String mainName;

    @NotBlank(message = "金蝶物料不能空")
    @ApiModelProperty(value = "金蝶物料id")
    private String materialId;

    @NotBlank(message = "金蝶物料编码不能空")
    @ApiModelProperty(value = "金蝶物料编码")
    private String materialNumber;

    @NotBlank(message = "金蝶物料名称不能空")
    @ApiModelProperty(value = "金蝶物料名称")
    private String materialName;

    @NotBlank(message = "金蝶物料旧编码不能空")
    @ApiModelProperty(value = "金蝶物料旧编码")
    private String materialOldNumber;

    @ApiModelProperty(value = "金蝶物料类型id")
    private String k3CategoryId;

    @ApiModelProperty(value = "金蝶物料类型编码")
    private String k3CategoryNumber;

    @ApiModelProperty(value = "金蝶物料类型名称")
    private String k3CategoryName;

    @NotNull(message = "规格不能空")
    @ApiModelProperty(value = "规格")
    private String specification;

    //@NotNull(message = "单位不能空")
    @ApiModelProperty(value = "基本单位编码")
    private String unit;

    @NotNull(message = "批发价不能为空")
    @ApiModelProperty(value = "批发价")
    private BigDecimal batchPrice;

    @ApiModelProperty(value = "格力折扣金额")
    private BigDecimal discAmount;

    @NotNull(message = "生效日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "生效日期")
    private Date startDate;

    @NotNull(message = "失效日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "失效日期")
    private Date endDate;

//    @NotNull(message = "是否促销价不能为空")
    @ApiModelProperty(value = "是否促销价 0=否 1=是")
    private Boolean isPromote;

    //@NotNull(message = "数量不能为空")
    @ApiModelProperty(value = "数量")
    private Integer qty;

    @ApiModelProperty(value = "是否发布 0=否 1=是")
    private Boolean isPublish;

    @Valid
    //@NotEmpty(message = "支付钱包类型不能空")
    @ApiModelProperty(value = "支付钱包类型")
    private List<ProductUpdPriceBillItemWallet> wallets;


    private List<ProductWalletBean> wallets2;

}
