package com.yh.saas.plugin.yiliangyiyun.entity;

import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;

import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 点价确认单
 * </p>
 *
 * @author Gongdc
 * @since 2021-08-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("price_confirmation_sheet")
public class PriceConfirmationSheet extends BaseModel<PriceConfirmationSheet> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 合同编号
     */
    private String contractNo;
    /**
     * 合同类型(1销售2采购)
     */
    private String contractType;
    /**
     * 点价单编号
     */
    private String priceListNo;
    /**
     * 点价单附件
     */
    private String addressUrl;
    /**
     * 附件状态
     */
    private String enclosureType;
    /**
     * 附件状态flag(0未上传1已上传)
     */
    private String enclosureTypeFlag;
    /**
     * 品种合约及方向
     */
    private String varietyContractDirection;
    /**
     * 买方
     */
    private String buyer;
    /**
     * 卖方
     */
    private String seller;
    /**
     * 买方电话
     */
    private String buyerPhone;
    /**
     * 卖方电话
     */
    private String sellerPhone;
    /**
     * 成交数量（手）
     */
    private Float transactionsNumberHand;
    /**
     * 成交数量（吨）
     */
    private Float transactionsNumber;
    /**
     * 成交价格（元/吨）
     */
    private Float transactionPrice;
    /**
     * 成交日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date transactionDate;
    /**
     * 备注
     */
    private String remarks;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public static class QueryFiles {

        public static final String CONTRACT_NO = "contract_no";

        public static final String DELETE_FLAG = "delete_flag";

    }

}
