NotificationScheduleSubscriber.java

/*
 * Copyright 2026 Global Crop Diversity Trust
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root folder or http://www.apache.org/licenses/LICENSE-2.0
 */

package org.gringlobal.model.notification;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.genesys.blocks.model.EmptyModel;
import org.genesys.blocks.security.model.AclSid;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name = "notification_schedule_subscriber")
@Getter
@Setter
public class NotificationScheduleSubscriber extends EmptyModel {

	private static final long serialVersionUID = -6845160104336573564L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "notification_schedule_subscriber_id", columnDefinition = "int")
	private Long id;

	@ManyToOne(fetch = FetchType.LAZY, cascade = {})
	@JoinColumn(name = "notification_id", nullable = false)
	private NotificationSchedule notificationSchedule;

	@ManyToOne(fetch = FetchType.LAZY, cascade = {})
	@JoinColumn(name = "sid_id", nullable = false)
	protected AclSid sid;

	@Override
	public boolean canEqual(Object other) {
		return other instanceof NotificationScheduleSubscriber;
	}

}