package cn.com.qmth.stmms.biz.exam.model;

import cn.com.qmth.stmms.biz.user.model.User;
import cn.com.qmth.stmms.common.annotation.ExcelField;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "eb_subject_user")
public class SubjectUser implements Serializable {

    private static final long serialVersionUID = -304051934270195206L;

    @Id
    @GeneratedValue
    private Integer id;

    @Column(name = "subject_code", length = 32, nullable = false)
    @ExcelField(title = "科目代码", align = 2, sort = 20)
    private String subjectCode;

    @Column(name = "user_id", nullable = false)
    private Integer userId;

    @Transient
    @ExcelField(title = "科目(导入时可为空)", align = 2, sort = 30)
    private String subjectName;

    @Transient
    @ExcelField(title = "用户名(登录名)", align = 2, sort = 40)
    private String loginName;

    @Transient
    private ExamSubject subject;

    @Transient
    private User user;

    public SubjectUser() {
    }

    public Integer getId() {
        return id;
    }

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

    public String getSubjectCode() {
        return subjectCode;
    }

    public void setSubjectCode(String subjectCode) {
        this.subjectCode = subjectCode;
    }

    public Integer getUserId() {
        return userId;
    }

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

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public ExamSubject getSubject() {
        return subject;
    }

    public void setSubject(ExamSubject subject) {
        this.subject = subject;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

}
