package com.zd.exam.domain;

import com.zd.common.core.annotation.Excel;
import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 安全培训对象 el_safe_train
 *
 * @author zd
 * @date 2021-09-07
 */
@ApiModel(value = "安全培训", description = "安全培训")
public class ElSafeTrain extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @Excel(name = "名称")
    private String name;

    /**
     * 描述
     */
    @Excel(name = "描述")
    @ApiModelProperty(value = "描述")
    private String describe;

    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    @Excel(name = "内容")
    private String content;

    /**
     * 封面地址
     */
    @ApiModelProperty(value = "封面地址")
    @Excel(name = "封面地址")
    private String cover;

    /**
     * 用户id(权限作用)
     */
    @ApiModelProperty(value = "用户id")
    @Excel(name = "用户id(权限作用)")
    private Long userId;

    /**
     * 部门id
     */
    @ApiModelProperty(value = "部门id")
    @Excel(name = "部门id")
    private Long deptId;

    /**
     * 部门名称
     */
    @ApiModelProperty(value = "部门名称")
    @Excel(name = "部门名称")
    private String deptName;
    /**
     * 学科类别
     */
    @ApiModelProperty(value = "学科类别")
    @Excel(name = "学科类别")
    private Integer subjectClass;

    private String beginTime;

    private String endTime;

    /**
     * 解决字典值是字符串 回显没法对应显示的问题
     *
     * @return
     */
    public String getSubjectClasss() {
        return subjectClass == null ? "" : subjectClass.toString();
    }

    public Integer getSubjectClass() {
        return subjectClass;
    }

    public void setSubjectClass(Integer subjectClass) {
        this.subjectClass = subjectClass;
    }

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

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getDescribe() {
        return describe;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getCover() {
        return cover;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("describe", getDescribe())
                .append("content", getContent())
                .append("cover", getCover())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .toString();
    }
}
