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.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.base.framework.CustomJsonDateDeserializer;
import com.mortals.xhx.module.project.model.vo.ProjectVo;
/**
* 学习项目实体对象
*
* @author zxfei
* @date 2023-02-23
*/

public class ProjectEntity extends ProjectVo {
    private static final long serialVersionUID = 1L;

    /**
    * 标题
    */
    @Excel(name = "标题")
    private String title;
    /**
    * 项目类型(0.法律法规,1.业务知识,2.行业知识,3.通用知识)
    */
    private Integer projectType;
    /**
    * 开始时间
    */
    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
    private Date projectStartTime;
    /**
    * 结束时间
    */
    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
    private Date projectEndTime;
    /**
    * 是否置顶(0.否，1.是)
    */
    private Integer top;
    /**
    * 已读要求(0. 学员进入学习项目详情即标记为已读)
    */
    private Integer readRequest;
    /**
    * 学习内容
    */
    private String studyContent;
    /**
    * 文件路径
    */
    private String filePath;
    /**
    * 文件名称
    */
    private String fileName;
    /**
    * 备注
    */
    private String remark;



    public ProjectEntity(){}
    /**
    * 获取 标题
    * @return String
    */
    public String getTitle(){
        return title;
    }
    /**
    * 设置 标题
    * @param title
    */
    public void setTitle(String title){
        this.title = title;
    }
    /**
    * 获取 项目类型(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 Date
    */
    public Date getProjectStartTime(){
        return projectStartTime;
    }
    /**
    * 设置 开始时间
    * @param projectStartTime
    */
    public void setProjectStartTime(Date projectStartTime){
        this.projectStartTime = projectStartTime;
    }
    /**
    * 获取 结束时间
    * @return Date
    */
    public Date getProjectEndTime(){
        return projectEndTime;
    }
    /**
    * 设置 结束时间
    * @param projectEndTime
    */
    public void setProjectEndTime(Date projectEndTime){
        this.projectEndTime = projectEndTime;
    }
    /**
    * 获取 是否置顶(0.否，1.是)
    * @return Integer
    */
    public Integer getTop(){
        return top;
    }
    /**
    * 设置 是否置顶(0.否，1.是)
    * @param top
    */
    public void setTop(Integer top){
        this.top = top;
    }
    /**
    * 获取 已读要求(0. 学员进入学习项目详情即标记为已读)
    * @return Integer
    */
    public Integer getReadRequest(){
        return readRequest;
    }
    /**
    * 设置 已读要求(0. 学员进入学习项目详情即标记为已读)
    * @param readRequest
    */
    public void setReadRequest(Integer readRequest){
        this.readRequest = readRequest;
    }
    /**
    * 获取 学习内容
    * @return String
    */
    public String getStudyContent(){
        return studyContent;
    }
    /**
    * 设置 学习内容
    * @param studyContent
    */
    public void setStudyContent(String studyContent){
        this.studyContent = studyContent;
    }
    /**
    * 获取 文件路径
    * @return String
    */
    public String getFilePath(){
        return filePath;
    }
    /**
    * 设置 文件路径
    * @param filePath
    */
    public void setFilePath(String filePath){
        this.filePath = filePath;
    }
    /**
    * 获取 文件名称
    * @return String
    */
    public String getFileName(){
        return fileName;
    }
    /**
    * 设置 文件名称
    * @param fileName
    */
    public void setFileName(String fileName){
        this.fileName = fileName;
    }
    /**
    * 获取 备注
    * @return String
    */
    public String getRemark(){
        return remark;
    }
    /**
    * 设置 备注
    * @param remark
    */
    public void setRemark(String remark){
        this.remark = remark;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof ProjectEntity) {
            ProjectEntity tmp = (ProjectEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",title:").append(getTitle());
        sb.append(",projectType:").append(getProjectType());
        sb.append(",projectStartTime:").append(getProjectStartTime());
        sb.append(",projectEndTime:").append(getProjectEndTime());
        sb.append(",top:").append(getTop());
        sb.append(",readRequest:").append(getReadRequest());
        sb.append(",studyContent:").append(getStudyContent());
        sb.append(",filePath:").append(getFilePath());
        sb.append(",fileName:").append(getFileName());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue(){

            this.title = "";

            this.projectType = 0;

            this.projectStartTime = null;

            this.projectEndTime = null;

            this.top = 0;

            this.readRequest = 0;

            this.studyContent = "";

            this.filePath = "";

            this.fileName = "";

            this.remark = "";

            this.setPerson(0);
    }
}