package com.ruoyi.web.sales.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.web.base.domain.base.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sales_return")
@ApiModel(value = "SalesReturn对象", description = "销售退回单")
public class SalesReturn extends Base {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "单据日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "单据日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date documentDate;

    @ApiModelProperty(value = "单据编号")
    @Excel(name = "单据编号")
    private String returnNum;

    @ApiModelProperty(value = "销货转入(销售出库单编号)")
    @Excel(name = "销货转入")
    private String deliveryNum;

    @ApiModelProperty(value = "客户编号")
    @Excel(name = "客户编号")
    private String customerNum;

    @ApiModelProperty(value = "客户名称")
    @Excel(name = "客户名称")
    @TableField(exist = false)
    private String customerName;

    @ApiModelProperty(value = "应收客户")
    @Excel(name = "应收客户")
    private String receivableCustomer;

    @ApiModelProperty(value = "业务员编号")
    @Excel(name = "业务员编号")
    private String employeeNum;

    @TableField(exist = false)
    @ApiModelProperty(value = "业务员姓名")
    private String employeeName;

    @ApiModelProperty(value = "总计金额")
    @Excel(name = "总计金额")
    private String totalAmount;

    @ApiModelProperty(value = "审核状态")
    @Excel(name = "审核状态", readConverterExp = "0=未审核,1=已审核")
    private Integer auditStatus;

    @ApiModelProperty(value = "冲销状态")
    private Integer offsetStatus;

    @TableField(exist = false)
    @ApiModelProperty(value = "货品清单")
    private List<SalesReturnGoods> goods;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "单据日期开始")
    private Date documentDateStart;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "单据日期结束")
    private Date documentDateEnd;

    @TableField(exist = false)
    @ApiModelProperty(value = "查询-货品编号")
    private String goodsNum;

    @TableField(exist = false)
    @ApiModelProperty(value = "查询-货品名称")
    private String goodsName;

    @TableField(exist = false)
    @ApiModelProperty(value = "查询-仓库编号")
    private String warehouseNum;

    @TableField(exist = false)
    @ApiModelProperty(value = "查询-仓库名称")
    private String warehouseName;
}
