package com.bonus.material.purchase.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 新购验收任务对象 purchase_check_info
 * @author syruan
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ToString
public class PurchaseCheckInfo extends BaseEntity {

    private static final long serialVersionUID = 1335730477657434485L;

    /** 主键id */
    private Long id;

    /** 任务ID */
    @Excel(name = "任务ID")
    @ApiModelProperty(value = "任务ID")
    private Long taskId;

    @ApiModelProperty(value = "任务状态")
    private Integer taskStatus;

    @ApiModelProperty(value = "采购单号")
    private String code;

    /** 采购日期 */
    @ApiModelProperty(value = "采购日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date purchaseTime;

    /** 到货日期 */
    @ApiModelProperty(value = "到货日期")
    @NotNull(message = "到货日期不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "到货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date arrivalTime;

    /** 采购员 */
    @Excel(name = "采购员")
    @ApiModelProperty(value = "采购员")
    private Long purchaser;

    /** 物资厂家id */
    @Excel(name = "物资厂家id")
    @ApiModelProperty(value = "物资厂家id")
    private Long supplierId;

    /** 物资厂家名称 */
    @Excel(name = "物资厂家名称")
    @ApiModelProperty(value = "物资厂家名称")
    private String supplier;

    /** 数据所属组织 */
    @Excel(name = "数据所属组织")
    private Long companyId;

    /**
     * 采购物资
     */
    @ApiModelProperty(value = "采购物资--外层Table字段")
    private String purchaseMaTypeName;

    /**
     * 采购数量
     */
    @ApiModelProperty(value = "采购数量--外层Table字段")
    private Long purchaseMaNumber;

    /**
     * 采购单价(不含税)
     */
    @ApiModelProperty(value = "采购单价(不含税)--外层Table字段")
    private BigDecimal purchasePrice;

    /**
     * 采购单价(含税)
     */
    @ApiModelProperty(value = "采购单价(含税)--外层Table字段")
    private BigDecimal purchaseTaxPrice;

    /**
     * 税率
     */
    @ApiModelProperty(value = "税率 0~100")
    @Size(max = 100, message = "税率长度必须介于 0 和 100 之间")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "操作人名称")
    private String createUserName;

    @ApiModelProperty(value = "新购模块阶段名称")
    private String modelName;

}
