package com.yihu.hos.tenant.model;

import java.util.UUID;

/**
 *  租户缓存信息
 * @created Airhead 2016/11/16.
 */
public class TenantSession {
    private String userCode;
    private String token;
    private String schema;
    private String tenant;
    private String schemaTemp;


    private String role;//角色类型；admin：管理员，null ：普通租户

    public TenantSession() {
    }

    public TenantSession(String tenant, String schema) {
        this.tenant = tenant;
        this.schema = schema;
        this.schemaTemp = schema;
        token = UUID.randomUUID().toString();
    }

    public TenantSession(String userCode, String schema,String token) {
        this.userCode = userCode;
        this.schema = schema;
        this.schemaTemp = schema;
        this.token = token;
    }


    public String getSchemaTemp() {
        return schemaTemp;
    }

    public void setSchemaTemp(String schemaTemp) {
        this.schemaTemp = schemaTemp;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getSchema() {
        return schema;
    }

    public void setSchema(String schema) {
        this.schema = schema;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getTenant() {
        return tenant;
    }

    public void setTenant(String tenant) {
        this.tenant = tenant;
    }
}
