package com.ruoyi.oa.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * cmc项目变更对象 cmc_project_change
 * 
 * @author cmc
 * @date 2024-06-05
 */
public class CmcProjectChange extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 变更id */
    private String changeId;

    /** 项目id */
    private String projectId;
    @Excel(name = "项目编号")
    private String projectNumber;
    @Excel(name = "项目名称")
    private String projectName;
    @Excel(name = "承担部门")
    private String undertakingDeptName;
    private String undertakingDept;
    @Excel(name = "项目负责人")
    private String leaderUserName;

    /** 变更内容 */
    @Excel(name = "变更内容")
    private String content;

    /** 登记人 */
    @Excel(name = "登记人")
    private String registrantUserName;
    private Long registrant;

    /** 登记时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registerTime;

    private CmcProject project;

    private SysUser leaderUser;

    private SysUser registrantUser;

    public void setChangeId(String changeId)
    {
        this.changeId = changeId;
    }

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

    public String getProjectId() 
    {
        return projectId;
    }
    public void setUndertakingDept(String undertakingDept)
    {
        this.undertakingDept = undertakingDept;
    }

    public String getUndertakingDept()
    {
        return undertakingDept;
    }
    public void setUndertakingDeptName(String undertakingDeptName)
    {
        this.undertakingDeptName = undertakingDeptName;
    }

    public String getUndertakingDeptName()
    {
        return undertakingDeptName;
    }
    public void setProject(CmcProject project)
    {
        this.project = project;
        this.projectNumber = project == null ? "" : project.getProjectNumber();
        this.projectName = project == null ? "" : project.getProjectName();
    }

    public CmcProject getProject()
    {
        return project;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setRegistrant(Long registrant) 
    {
        this.registrant = registrant;
    }

    public Long getRegistrant() 
    {
        return registrant;
    }
    public void setLeaderUser(SysUser leaderUser)
    {
        this.leaderUser = leaderUser;
        this.leaderUserName = leaderUser == null ? "" : leaderUser.getNickName();
    }

    public SysUser getLeaderUser()
    {
        return leaderUser;
    }
    public void setRegistrantUser(SysUser registrantUser)
    {
        this.registrantUser = registrantUser;
        this.registrantUserName = registrantUser == null ? "" : registrantUser.getNickName();
    }

    public SysUser getRegistrantUser()
    {
        return registrantUser;
    }
    public void setRegisterTime(Date registerTime) 
    {
        this.registerTime = registerTime;
    }

    public Date getRegisterTime() 
    {
        return registerTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("changeId", getChangeId())
            .append("projectId", getProjectId())
            .append("content", getContent())
            .append("registrant", getRegistrant())
            .append("registerTime", getRegisterTime())
            .toString();
    }
}
