package com.sf.apijson.config;

import java.util.Collections;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;

import apijson.orm.Visitor;

/***
 * form表单session visitor 用于获取当前用户id, 判断用户自定义角色(比如admin等)
 * 
 * @author xy
 *
 */
public class FormUserVisitor implements Visitor<String> {
	private String id;
	private String role; // 1: admin管理员

	public String getRole() {
		return role;
	}

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

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

	@Override
	public String getId() {
		return this.id;
	}

	@JSONField(serialize = false)
	@Override
	public List<String> getContactIdList() {
		return Collections.emptyList();
	}
}
