package com.reyun.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

@Entity
@Table(name = "event_source")
@IdClass(EventMapPK.class)
public class Event {

	// 事件名
	@Id
	private String eventName;
	// 事件属性
	@Id
	private String eventAttr;
	private String dataType;
	private boolean common;
	@Id
	private String appkey;

	public String getEventName() {
		return eventName;
	}

	public void setEventName(String eventName) {
		this.eventName = eventName;
	}

	public String getEventAttr() {
		return eventAttr;
	}

	public void setEventAttr(String eventAttr) {
		this.eventAttr = eventAttr;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public boolean isCommon() {
		return common;
	}

	public void setCommon(boolean common) {
		this.common = common;
	}

	public String getAppkey() {
		return appkey;
	}

	public void setAppkey(String appkey) {
		this.appkey = appkey;
	}

	@Override
	public String toString() {
		return "Event{" +
				"eventName='" + eventName + '\'' +
				", eventAttr='" + eventAttr + '\'' +
				", dataType='" + dataType + '\'' +
				", common=" + common +
				", appkey='" + appkey + '\'' +
				'}';
	}
}
