package com.mortals.xhx.module.project.model;

import java.util.Date;
import java.util.List;
import java.util.ArrayList;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.project.model.vo.ProjectStudyVo;

/**
 * 项目学习人员实体对象
 *
 * @author zxfei
 * @date 2023-02-23
 */

public class ProjectStudyEntity extends ProjectStudyVo {
    private static final long serialVersionUID = 1L;

    /**
     * 项目id
     */
    private Long projectId;
    /**
     * 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)
     */
    private Integer projectType;
    /**
     * 项目名称
     */
    @Excel(name = "项目名称")
    private String title;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    private String userName;
    /**
     * 所属部门
     */
    @Excel(name = "所属部门")
    private String deptName;
    /**
     * 学习状态(0.未学习,1.已学习)
     */
    private Integer studyStatus;
    /**
     * 是否置顶(0.否，1.是)
     */
    private Integer top;
    /**
     * 学习时间
     */
    private Date studyTime;
    /**
     * 备注
     */
    private String remark;


    public ProjectStudyEntity() {
    }

    /**
     * 获取 项目id
     *
     * @return Long
     */
    public Long getProjectId() {
        return projectId;
    }

    /**
     * 设置 项目id
     *
     * @param projectId
     */
    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    /**
     * 获取 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)
     *
     * @return Integer
     */
    public Integer getProjectType() {
        return projectType;
    }

    /**
     * 设置 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)
     *
     * @param projectType
     */
    public void setProjectType(Integer projectType) {
        this.projectType = projectType;
    }

    /**
     * 获取 项目名称
     *
     * @return String
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置 项目名称
     *
     * @param title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取 用户id
     *
     * @return Long
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 设置 用户id
     *
     * @param userId
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 获取 用户名称
     *
     * @return String
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 设置 用户名称
     *
     * @param userName
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 获取 所属部门
     *
     * @return String
     */
    public String getDeptName() {
        return deptName;
    }

    /**
     * 设置 所属部门
     *
     * @param deptName
     */
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    /**
     * 获取 学习状态(0.未学习,1.已学习)
     *
     * @return Integer
     */
    public Integer getStudyStatus() {
        return studyStatus;
    }

    /**
     * 设置 学习状态(0.未学习,1.已学习)
     *
     * @param studyStatus
     */
    public void setStudyStatus(Integer studyStatus) {
        this.studyStatus = studyStatus;
    }

    /**
     * 获取 是否置顶(0.否，1.是)
     *
     * @return Integer
     */
    public Integer getTop() {
        return top;
    }

    /**
     * 设置 是否置顶(0.否，1.是)
     *
     * @param top
     */
    public void setTop(Integer top) {
        this.top = top;
    }

    /**
     * 获取 学习时间
     *
     * @return Date
     */
    public Date getStudyTime() {
        return studyTime;
    }

    /**
     * 设置 学习时间
     *
     * @param studyTime
     */
    public void setStudyTime(Date studyTime) {
        this.studyTime = studyTime;
    }

    /**
     * 获取 备注
     *
     * @return String
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置 备注
     *
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }


    @Override
    public int hashCode() {
        return (this.getProjectId() + this.getUserId() + "").hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof ProjectStudyEntity) {
            ProjectStudyEntity tmp = (ProjectStudyEntity) obj;
            if (this.getProjectId() == tmp.getProjectId() && this.getUserId() == tmp.getUserId()) {
                return true;
            }
        }
        return false;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("");
        sb.append(",projectId:").append(getProjectId());
        sb.append(",projectType:").append(getProjectType());
        sb.append(",title:").append(getTitle());
        sb.append(",userId:").append(getUserId());
        sb.append(",userName:").append(getUserName());
        sb.append(",deptName:").append(getDeptName());
        sb.append(",studyStatus:").append(getStudyStatus());
        sb.append(",top:").append(getTop());
        sb.append(",studyTime:").append(getStudyTime());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue() {

        this.projectId = null;

        this.projectType = 0;

        this.title = "";

        this.userId = null;

        this.userName = "";

        this.deptName = "";

        this.studyStatus = 0;

        this.top = 0;

        this.studyTime = null;

        this.remark = "";
    }
}