package com.uas.platform.b2b.erp.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 *  投标单明细
 * Created by dongbw
 * 17/03/30 11:53.
 */
@Table(name = "sale$tenderitem")
@Entity
public class SaleTenderItemErp implements Serializable{

    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "sti_id")
    private Long id;


    /**
     * 税率
     */
    @Column(name = "sti_taxrate")
    private Long taxrate;

    /**
     * 单价
     */
    @Column(name = "sti_price")
    private Double price;

    /**
     * 采购周期
     */
    @Column(name = "sti_cycle")
    private Long cycle;

    /**
     * 说明
     */
    @Column(name = "sti_description")
    private String description;

    /**
     * 中标状态(为空表示未处理，0表示未中标，1表示已中标)
     */
    @Column(name = "sti_applystatus")
    private Short applyStatus;

//    /**
//     * 投标状态（用于search项目的单据过滤，是否投标其实可以通过是否存在价格判断）
//     */
//    @Column(name = "sti_status")
//    private String status;

    /**
     * 招标产品明细
     */
    @ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE})
    @JoinColumn(name = "sti_tpid", nullable = false)
    private SaleTenderProdErp tenderProd;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getTaxrate() {
        return taxrate;
    }

    public void setTaxrate(Long taxrate) {
        this.taxrate = taxrate;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Long getCycle() {
        return cycle;
    }

    public void setCycle(Long cycle) {
        this.cycle = cycle;
    }

    public Short getApplyStatus() {
        return applyStatus;
    }

    public void setApplyStatus(Short applyStatus) {
        this.applyStatus = applyStatus;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


    public SaleTenderProdErp getTenderProd() {
        return tenderProd;
    }

    public void setTenderProd(SaleTenderProdErp tenderProd) {
        this.tenderProd = tenderProd;
    }

}
