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 java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sales_price_item")
@ApiModel(value = "SalesPriceItem对象", description = "销售价格明细")
public class SalesPriceItem extends Base {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "价格单编号")
    private String priceNum;

    @ApiModelProperty(value = "物料编号")
    @Excel(name = "物料编号")
    private String materialNum;

    @ApiModelProperty(value = "级别")
    @Excel(name = "级别")
    @TableField("level")
    private String level;

    @ApiModelProperty(value = "品种")
    @Excel(name = "品种")
    private String variety;

    @ApiModelProperty(value = "单位")
    @Excel(name = "单位")
    private String unit;

    @ApiModelProperty(value = "单价")
    @Excel(name = "单价")
    private java.math.BigDecimal unitPrice;

    @ApiModelProperty(value = "自提价")
    @Excel(name = "自提价")
    private java.math.BigDecimal pickupPrice;

    @TableField(exist = false)
    @ApiModelProperty(value = "物料名称")
    @Excel(name = "物料名称")
    private String materialName;

    @TableField(exist = false)
    @ApiModelProperty(value = "物料规格")
    @Excel(name = "物料规格")
    private String materialSpec;

    /** 以下自 sales_price 主表带出（/price/list 等），不落库 */
    @TableField(exist = false)
    @ApiModelProperty(value = "价格类型编码")
    private String priceType;

    @TableField(exist = false)
    @ApiModelProperty(value = "价格类型名称")
    private String priceTypeName;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "主表执行日期")
    private Date effectiveDate;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "主表失效日期")
    private Date expireDate;
}
