package com.yihu.jw.entity.base.role;

import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Entity - 角色
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_role")
public class RoleDO extends UuidIdentityEntityWithOperator {

	// 基础三大类角色，对应base_role中code的值，如果有改，务必保持同步
	public enum BaseRoleType{
		// 超级管理员
		admin,
		// 租户管理员
		saasAdmin,
		//机构管理员
		hosAdmin
	}

	/**
	 * 角色代码
	 */
	private String code;
	/**
	 * 角色名称
	 */
	private String name;
	/**
	 * 1.系统管理员，2.saas管理员，3.机构管理员
     */
	private Integer type;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 是否系统管理员
	 */
	private Boolean system;

	private String saasId;

	private Integer status;//1生效，-1失效

	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}

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

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "system")
	public Boolean getSystem() {
		return system;
	}

	public void setSystem(Boolean system) {
		this.system = system;
	}

	@Column(name = "code")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "type")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "saas_id")
	public String getSaasId() {
		return saasId;
	}

	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
}