package com.yonge.cooleshow.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.yonge.toolset.base.enums.BaseEnum;

/**
 * @author sunzl 
 * 2015年8月25日 下午4:19:00 
 * 会员状态枚举类
 */
public enum AccessSource implements BaseEnum<Integer, AccessSource> {

	PC(1, "PC端"), MOBILE(2, "移动端"), WX(3, "微信");
	@EnumValue
	private Integer code;

	private AccessSource(Integer code, String remark) {
		this.code = code;
		this.remark = remark;
	}

	private String remark;

	public Integer getCode() {
		return code;
	}

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

	public String getRemark() {
		return remark;
	}

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

	public static AccessSource codeOf(int code) {
		for (AccessSource userStatus : AccessSource.values()) {
			if (code == userStatus.getCode()) {
				return userStatus;
			}
		}
		return null;
	}
}
