package cn.palmte.work.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * 项目结算利润率表
 * @author Yuanping Zhang
 * @date 2021/11/10
 */
@Entity
@Table(name = "project_settle_profit_margin")
public class ProjectSettleProfitMargin {

    public static final int TYPE_GROSS_PROFIT = 1;//项目毛利
    public static final int TYPE_CONTRIBUTION_PROFIT = 2;//项目贡献利润
    public static final int TYPE_NET_PROFIT = 3;//项目净利润

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @GenericGenerator(name = "persistenceGenerator", strategy = "increment")
    private Integer id;

    @Column(name = "project_id")
    private int projectId;

    @Column(name = "type")
    private int type;

    @Column(name = "amount")
    private BigDecimal amount;

    @Column(name = "time")
    private String time;

    @Column(name = "estimate")
    private BigDecimal estimate;

    @Column(name = "budget")
    private BigDecimal budget;

    @Column(name = "profit_margin")
    private BigDecimal profitMargin;

    public BigDecimal getProfitMargin() {
        return profitMargin;
    }

    public void setProfitMargin(BigDecimal profitMargin) {
        this.profitMargin = profitMargin;
    }

    public Integer getId() {
        return id;
    }

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

    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public BigDecimal getEstimate() {
        return estimate;
    }

    public void setEstimate(BigDecimal estimate) {
        this.estimate = estimate;
    }

    public BigDecimal getBudget() {
        return budget;
    }

    public void setBudget(BigDecimal budget) {
        this.budget = budget;
    }
}