All Downloads are FREE. Search and download functionalities are using the official Maven repository.

events.system.model.EventMessages Maven / Gradle / Ivy

package events.system.model;

import hbm.entity.BaseEntity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import message.system.model.Messages;

/**
 * The Entity class {@link EventMessages} is keeping the information for the connection between the
 * Entity class {@link EventLocations} and the Entity class {@link Messages}.
 */
@Entity
@Table(name = "event_messages")
@Getter
@Setter
@NoArgsConstructor
public class EventMessages extends BaseEntity implements Cloneable
{
	/** The serial Version UID */
	private static final long serialVersionUID = 1L;
	/**
	 * The eventLocation attribute that references to the Entity class {@link EventLocations}.
	 */
	@ManyToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "event_location_id", nullable = true, referencedColumnName = "id", foreignKey = @ForeignKey(name = "FK_EVENT_MESSAGES_EVENT_LOCATION_ID"))
	private EventLocations eventLocation;
	/**
	 * The message attribute that references to the Entity class {@link Messages}.
	 */
	@ManyToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "message_id", nullable = true, referencedColumnName = "id", foreignKey = @ForeignKey(name = "FK_EVENT_MESSAGES_MESSAGE_ID"))
	private Messages message;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy