bstlboard-back/src/main/java/de/bstly/board/model/Flag.java

110 lines
1.8 KiB
Java

/**
*
*/
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 = "flags")
@EntityListeners({ AuditingEntityListener.class })
public class Flag {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Column(name = "target", nullable = false)
private Long target;
@Column(name = "target_type", nullable = false)
private Types targetType;
@Column(name = "author", nullable = false)
private String author;
/**
* 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;
}
/**
* 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 author.
*
* @return the author
*/
public String getAuthor() {
return author;
}
/**
* Sets the author.
*
* @param author the new author
*/
public void setAuthor(String author) {
this.author = author;
}
}