package com.zd.exam.domain;

import javax.validation.constraints.NotNull;

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

/**
 * 学习资料访问对象 el_course_access_record
 *
 * @author liubo
 * @date 2021-12-07
 */
@ApiModel("学习资料访问")
public class ElCourcesAccessRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ApiModelProperty(value = "${comment}")
    private Long id;
    /**
     * 用户id(权限作用)
     */
    @Excel(name = "用户id(权限作用)")
    @ApiModelProperty(value = "用户id(权限作用)")
    private Long userId;
    /**
     * 部门id
     */
    @Excel(name = "部门id")
    @ApiModelProperty(value = "部门id")
    private Long deptId;
    /**
     * 部门名称
     */
    @Excel(name = "部门名称")
    @Length(message = "部门名称长度不能超过64")
    @ApiModelProperty(value = "部门名称")
    private String deptName;
    /**
     * 课程ID
     */
    @Excel(name = "课程ID")
    @NotNull(groups = ValidGroup.Crud.Create.class, message = "课程ID不能为空")
    @ApiModelProperty(value = "课程ID")
    private Long courseId;
    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    @NotNull(groups = ValidGroup.Crud.Create.class, message = "用户ID不能为空")
    @ApiModelProperty(value = "用户ID")
    private Long joinUserId;

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

    public Long getId() {
        return id;
    }

    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 void setcourseId(Long courseId) {
        this.courseId = courseId;
    }

    public Long getcourseId() {
        return courseId;
    }

    public void setJoinUserId(Long joinUserId) {
        this.joinUserId = joinUserId;
    }

    public Long getJoinUserId() {
        return joinUserId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("courseId", getcourseId())
                .append("joinUserId", getJoinUserId())
                .toString();
    }
}
