package com.gree.mall.manager.bean.material.manage;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@ApiModel
@Data
public class WebsitSalesItemBean {

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

    @ApiModelProperty(value = "销售单号")
    private String salesId;

    @ApiModelProperty(value = "商品类型 M=辅材 P=配件")
    private String goodsType;

    @ApiModelProperty(value = "网点编号")
    private String websitId;

    @ApiModelProperty(value = "网点名称")
    private String websitName;

    @ApiModelProperty(value = "商品价格id")
    private String goodsPriceId;

    @NotBlank(message = "商品编号不能为空")
    @ApiModelProperty(value = "商品编号")
    private String goodsId;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @NotNull(message = "销售数量不能为空")
    @Min(value = 1, message = "销售数量不能少于1")
    @ApiModelProperty(value = "销售数量")
    private BigDecimal salesQty;

    @NotNull(message = "售价不能为空")
    @ApiModelProperty(value = "售价")
    private BigDecimal price;

    @ApiModelProperty(value = "销售金额")
    private BigDecimal saleAmount;

    @ApiModelProperty(value = "收费标准")
    private BigDecimal normPrice;

    @ApiModelProperty(value = "网点销售单位")
    private String goodsStockUnit;

    @ApiModelProperty(value = "师傅销售单位")
    private String goodsSalesUnit;

    @ApiModelProperty(value = "规格型号")
    private String goodsSpecification;

    @ApiModelProperty(value = "销售单位转换系数")
    private BigDecimal goodsSalesConvertQty;

    @ApiModelProperty(value = "转换数保留小数位（以0舍1入方式保留）")
    private Integer convertBitScale;

    @ApiModelProperty(value = "商品父类编号")
    private String parentCategoryId;

    @ApiModelProperty(value = "商品父类名称")
    private String parentCategoryName;

    @ApiModelProperty(value = "商品小类编号")
    private String goodsCategoryId;

    @ApiModelProperty(value = "商品小类名称")
    private String goodsCategoryName;

    @ApiModelProperty(value = "适用品牌")
    private String brand;

    @ApiModelProperty(value = "适用产品大类")
    private String productCategory;

    @ApiModelProperty(value = "旧件返还数量")
    private BigDecimal oldRefundQty;

    @ApiModelProperty(value = "支付方式 CASH=现金 WECHAT=微信")
    private String payType;

    @ApiModelProperty(value = "退货数量")
    private BigDecimal retQty;

    @ApiModelProperty(value = "是否入师傅库存 NO=否 YES=是")
    private String manageWorkerStock;

    @ApiModelProperty(value = "转换师傅单价")
    private BigDecimal convertPrice;

    @ApiModelProperty(value = "转换师傅入库数量")
    private BigDecimal convertQty;

    @ApiModelProperty(value = "转换师傅退货数量")
    private BigDecimal convertRetQty;

    @ApiModelProperty(value = "师傅商品id")
    private String workerGoodsId;

    @ApiModelProperty(value = "师傅商品名称")
    private String workerGoodsName;

    @ApiModelProperty(value = "库存数量（保存状态时显示）")
    private BigDecimal stockQty;

    @ApiModelProperty(value = "商品信息来源 BASE=基础资料 ENGIN=工程基础资料")
    private String itemSourceType;

    @ApiModelProperty(value = "商品信息id")
    private String itemSourceId;

    @ApiModelProperty(value = "收费类型 M=物料收费 S=服务收费")
    private String normType;

    @ApiModelProperty(value = "原配件单价")
    private BigDecimal origPartsPrice;
}
