package com.huiju.estateagents.event;

import lombok.Data;
import org.springframework.context.ApplicationEvent;

/**
 * 积分自定义积分事件
 * @author FXF
 * @date 2019-07-30
 */
@Data
public class EventBus extends ApplicationEvent {
	EventType type;
	private Integer orgId;
	
	public EventBus(Object source, EventType type, Integer orgId) {
		super(source);
		this.type = type;
		this.orgId = orgId;
	}

	public enum EventType {
		// 分享海报
		SharePoster(1),

		// 签到
		DailyCheckin(2),

		// 推荐客户
		RecommendCustomer(3),

		// 注册经纪人
		SignUpAgent(4),

		// 没有限制的 分享海报加积分
		SharePosterAll(5),

		// 活动核销签到
		ActivityVerificationSign(6),

		// 资料审核成功
		DocumentVerify(7),

		// 普通活动扫码签到
		ActivityCheckin(8);

		private Integer type;

		EventType(Integer type) {
			this.type = type;
		}

		public Integer toInt() {
			return type;
		}
	}
}
