package cn.edu.whu.boot.allocation.entities;

import java.io.Serializable;

public class TaskUserRole implements Serializable{

    private static final long serialVersionUID = 2002012690341409624L;
    private Integer id;

    private Integer taskId;

    private Integer userId;

    // 1：审核人员
    // 0：采集人员
    private Integer workRole;


    public TaskUserRole() {
    }

    public TaskUserRole(Integer taskId, Integer userId, Integer workRole) {
        this.taskId = taskId;
        this.userId = userId;
        this.workRole = workRole;
    }

    public Integer getId() {
        return id;
    }

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

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public Integer getUserId() {
        return userId;
    }

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

    public Integer getWorkRole() {
        return workRole;
    }

    public void setWorkRole(Integer workRole) {
        this.workRole = workRole;
    }

    public boolean isCollector() {
        return this.workRole.equals(0);
    }

    public boolean isInspector() {
        return this.workRole.equals(1);
    }
}
