package com.jeeplus.modules.sg.project.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.core.persistence.DataEntity;

import java.util.Date;
import java.util.Objects;

/**
 * 项目信息
 */
public class WbsItem extends DataEntity<WbsItem> {
    private String id; //项目ID
    private String unit; //施工单位
    private String itemName; //项目名称
    private String itemNo;   //项目编号
    private String projectId; //工程ID
    private String parentNode; //父节点
    private String type; //项目类型
    private Date createDate;  //创建时间
    private String delFlag;//是否删除
    private String projectName; //所属工程
    private String projectNo;  //工程编号
    private String unitType;
    private Double integrityFee; //诚信扣款
    private String state; //是否扣款 （1：扣 0：不扣）
    private Double decFund;//甲供材超供抵扣工程款
    private Double texDeal;//税金处理

    public Double getDecFund() {
        return decFund;
    }

    public void setDecFund(Double decFund) {
        this.decFund = decFund;
    }

    public Double getTexDeal() {
        return texDeal;
    }

    public void setTexDeal(Double texDeal) {
        this.texDeal = texDeal;
    }

    public String getUnitType() {
        return unitType;
    }

    public void setUnitType(String unitType) {
        this.unitType = unitType;
    }

    public Double getIntegrityFee() {
        return integrityFee;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setIntegrityFee(Double integrityFee) {
        this.integrityFee = integrityFee;
    }

    @Override
    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateDate() {
        return createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getProjectId() {
        return projectId;
    }

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

    public String getParentNode() {
        return parentNode;
    }

    public void setParentNode(String parentNode) {
        this.parentNode = parentNode;
    }

    public String getType() {
        return type;
    }

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

    public String getItemNo() {
        return itemNo;
    }

    public void setItemNo(String itemNo) {
        this.itemNo = itemNo;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectNo() {
        return projectNo;
    }

    public void setProjectNo(String projectNo) {
        this.projectNo = projectNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof WbsItem)) return false;
        WbsItem wbsItem = (WbsItem) o;
        return Objects.equals(unit, wbsItem.unit);
    }

}
