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

import com.gree.mall.manager.plus.entity.WebsitSalesPayOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

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

@Data
@ApiModel
@Accessors(chain = true)
public class WebsitSalesBean {

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

    @ApiModelProperty(value = "商户编号")
    private String companyWechatId;

    @ApiModelProperty(value = "商户编号")
    private String companyWechatName;

    @NotBlank(message = "网点编号不能为空")
    @ApiModelProperty(value = "网点编号")
    private String websitId;

    @NotBlank(message = "网点名称不能为空")
    @ApiModelProperty(value = "网点名称")
    private String websitName;

    @NotBlank(message = "商品类型不能为空")
    @ApiModelProperty(value = "商品类型 M=辅材 P=配件")
    private String goodsType;

    @NotBlank(message = "购买方不能为空")
    @ApiModelProperty(value = "购买方 WORKER=内部师傅 CUSTOMER=客户")
    private String buyPeople;

    @ApiModelProperty(value = "工程师编号")
    private String workerId;

    @ApiModelProperty(value = "工程师名称")
    private String workerName;

    @ApiModelProperty(value = "工程师手机号")
    private String workerMobile;

    @NotBlank(message = "请选择销售类型")
    @ApiModelProperty(value = "销售类型")
    private String salesType;

    @ApiModelProperty(value = "工程师网点编号")
    private String workerWebsitId;

    @ApiModelProperty(value = "工程师网点名称")
    private String workerWebsitName;

    @ApiModelProperty(value = "身份证")
    private String identity;

    @ApiModelProperty(value = "销售日期")
    private Date salesTime;

    @NotBlank(message = "支付方式不能为空")
    @ApiModelProperty(value = "支付方式 CASH=现金 WECHAT=微信 ENGIN=工程支付")
    private String payType;

    @ApiModelProperty(value = "是否已支付 NO=否 YES=是 ")
    private String payFlag;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "支付订单号")
    private String payNo;

    @ApiModelProperty(value = "退货金额")
    private BigDecimal retAmount;

//    @NotBlank(message = "单据来源不能为空")
    @ApiModelProperty(value = "小程序/公众号")
    private String source;

    @ApiModelProperty(value = "单据来源 ONLINE=在线订单 SELF=自建订单")
    private String orderSource;

    @ApiModelProperty(value = "状态 SAVE=保存 SUBMIT=提交 PAY_NOT_TAKE=已支付,未提货 PAY_TAKE=已支付,已提货 FAIL=失败 ")
    private String flag;

    @ApiModelProperty(value = "原因")
    private String reason;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "提交人")
    private String submitBy;

    @ApiModelProperty(value = "提交时间")
    private Date submitTime;

    @ApiModelProperty(value = "审核人")
    private String confirmBy;

    @ApiModelProperty(value = "审核时间")
    private Date confirmTime;

    @ApiModelProperty(value = "附件url")
    private String fileUrl;

    @ApiModelProperty(value = "工程基础资料id")
    private String orderEnginBaseId;

    @ApiModelProperty(value = "工程名称")
    private String projectName;

    @ApiModelProperty(value = "工程编号")
    private String projectNo;

    @ApiModelProperty(value = "负责人")
    private String manger;

    @ApiModelProperty(value = "联系电话")
    private String mobile;

    @ApiModelProperty(value = "项目开始时间")
    private Date startTime;

    @ApiModelProperty(value = "项目结束时间")
    private Date endTime;

    @ApiModelProperty(value = "省")
    private String province;

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

    @ApiModelProperty(value = "市")
    private String city;

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

    @ApiModelProperty(value = "区")
    private String area;

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

    @ApiModelProperty(value = "街道")
    private String street;

    @ApiModelProperty(value = "街道id")
    private String streetId;

    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "仓储id")
    private String storageId;

    @ApiModelProperty(value = "仓储名称")
    private String storageName;

    @ApiModelProperty(value = "是否导入数据 true=是 false=否")
    private Boolean isImport;

    @Valid
    @NotEmpty(message = "明细不能为空")
    @ApiModelProperty(value = "明细")
    private List<WebsitSalesItemBean> items;

    @ApiModelProperty(value = "销售支付订单记录（有值时回显用）")
    private WebsitSalesPayOrder payOrder;
}
