package com.jwipc.tender.dto;

import com.jwipc.aggregation.annotation.RelationAggregationField;
import com.jwipc.supplier.client.SupplierClient;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 招标单
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-29
 */
@Data
public class TenderBidBaseDTO implements Serializable {


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

    /**
     * 招标单id
     */
    private Long tenderId;

    /**
     * 轮次id
     */
    private Long roundId;

    /**
     * 状态
     */
    private Integer  status;

    /**
     * 接受标记
     */
    private Integer  agreeFlag;

    /**
     * 不参与原因
     */
    private String disagreeRemark;

    /**
     * 投标时间
     */
    private LocalDateTime tenderTime;

    /**
     * 总报价(服务、基建和资产)
     */
    private BigDecimal totalAmount;

    /**
     * 税码
     */
    private String taxCode;

    /**
     * 税率
     */
    private BigDecimal taxRate;

    /**
     * 是否中标:是 或者 否
     */
    private String bidStatus;

    /**
     * 币种
     */
    private String currency;

    /**
     * 最终报价
     */
    private BigDecimal finalAmount;

    /**
     * 供应商id
     */
    private Long supplierId;
    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierCode",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierCode;

    @RelationAggregationField(
            masterIdField = "supplierId",
            relationIdField = "id",
            relationNameField = "supplierName",
            relationClientClass = SupplierClient.class,
            relationMethod = "getSupplierByIds"
    )
    private String supplierName;

    /**
     * 总分
     */
    private BigDecimal totalScore;

    private Integer ranking;

    private String contactsId;
    private BigDecimal finalCnyAmount;
    //汇率
    private BigDecimal exchangeRate;
    private String purchaseCategoryCode;
    private String purchaseCategoryName;
    private String paymentWay;
    private String paymentMethod;
    private String companyCode;
    /**
     * 合同编码
     */
    private String contractCode;
    /**
     * 合同链接
     */
    private String contractUrl;

    /**
     * 合同类型
     */
    private String contractType;
}
