package com.fzm.mall.server.admin.distribution.entity.dto;

import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 物流中心-运费模板
 * </p>
 *
 * @author wulixian
 * @since 2021-03-04
 */
@Data
@ApiModel(value = "Template新增对象", description = "物流中心-运费模板")
public class TemplateSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "模板名称", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String templateName;

    @ApiModelProperty(value = "发货地址id", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private String deliveryAddressId;

    @ApiModelProperty(value = "运费设置（1-阶梯计价 2-固定运费）", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer billingType;

    @ApiModelProperty(value = "运费金额")
    private BigDecimal freightAmount;

    @ApiModelProperty(value = "计价方式（1-按件数,2-按重量）", required = true)
    private Integer pricingType;

    @ApiModelProperty(value = "默认运费-基数（件或KG）")
    private BigDecimal baseNumber;

    @ApiModelProperty(value = "默认运费-基数对应的费用")
    private BigDecimal baseAmount;

    @ApiModelProperty(value = "默认运费-续件数（件或KG）")
    private BigDecimal addNumber;

    @ApiModelProperty(value = "默认运费-续件单价")
    private BigDecimal addCost;

    @ApiModelProperty(value = "商户id")
    private String merchantId;

    @ApiModelProperty(value = "运费规则(非默认)")
    private List<TemplateItemSaveDTO> templateItemList;
}
