130 lines
2.1 KiB
Java
Executable File
130 lines
2.1 KiB
Java
Executable File
/**
|
|
*
|
|
*/
|
|
package de.bstly.board.model;
|
|
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.EntityListeners;
|
|
import jakarta.persistence.GeneratedValue;
|
|
import jakarta.persistence.GenerationType;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.Table;
|
|
|
|
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|
|
|
import de.bstly.board.model.support.Types;
|
|
|
|
/**
|
|
* The Class Flag.
|
|
*/
|
|
@Entity
|
|
@Table(name = "notifications")
|
|
@EntityListeners({ AuditingEntityListener.class })
|
|
public class Notification {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
@Column(name = "id")
|
|
private Long id;
|
|
@Column(name = "target")
|
|
private Long target;
|
|
@Column(name = "parent")
|
|
private Long parent;
|
|
@Column(name = "target_type", nullable = false)
|
|
private Types targetType;
|
|
@Column(name = "owner", nullable = false)
|
|
private String owner;
|
|
@Column(name = "disabled", nullable = false)
|
|
private boolean disabled;
|
|
|
|
/**
|
|
* Gets the id.
|
|
*
|
|
* @return the id
|
|
*/
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
/**
|
|
* Sets the id.
|
|
*
|
|
* @param id the new id
|
|
*/
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
/**
|
|
* Gets the target.
|
|
*
|
|
* @return the target
|
|
*/
|
|
public Long getTarget() {
|
|
return target;
|
|
}
|
|
|
|
public Long getParent() {
|
|
return parent;
|
|
}
|
|
|
|
public void setParent(Long parent) {
|
|
this.parent = parent;
|
|
}
|
|
|
|
/**
|
|
* Sets the target.
|
|
*
|
|
* @param target the new target
|
|
*/
|
|
public void setTarget(Long target) {
|
|
this.target = target;
|
|
}
|
|
|
|
/**
|
|
* Gets the target type.
|
|
*
|
|
* @return the target type
|
|
*/
|
|
public Types getTargetType() {
|
|
return targetType;
|
|
}
|
|
|
|
/**
|
|
* Sets the target type.
|
|
*
|
|
* @param targetType the new target type
|
|
*/
|
|
public void setTargetType(Types targetType) {
|
|
this.targetType = targetType;
|
|
}
|
|
|
|
/**
|
|
* Gets the owner.
|
|
*
|
|
* @return the owner
|
|
*/
|
|
public String getOwner() {
|
|
return owner;
|
|
}
|
|
|
|
/**
|
|
* Sets the owner.
|
|
*
|
|
* @param owner the new owner
|
|
*/
|
|
public void setOwner(String owner) {
|
|
this.owner = owner;
|
|
}
|
|
|
|
public boolean isDisabled() {
|
|
return disabled;
|
|
}
|
|
|
|
public void setDisabled(boolean disabled) {
|
|
this.disabled = disabled;
|
|
}
|
|
|
|
}
|