42 lines
910 B
Java
42 lines
910 B
Java
package app.mealsmadeeasy.api.recipe.star;
|
|
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.EmbeddedId;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.Table;
|
|
|
|
import java.time.OffsetDateTime;
|
|
|
|
@Entity(name = "RecipeStar")
|
|
@Table(name = "recipe_star")
|
|
public final class RecipeStarEntity implements RecipeStar {
|
|
|
|
@EmbeddedId
|
|
private RecipeStarId id;
|
|
|
|
@Column(nullable = false, updatable = false)
|
|
private OffsetDateTime timestamp = OffsetDateTime.now();
|
|
|
|
public RecipeStarId getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public void setId(RecipeStarId id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public OffsetDateTime getTimestamp() {
|
|
return this.timestamp;
|
|
}
|
|
|
|
public void setTimestamp(OffsetDateTime date) {
|
|
this.timestamp = date;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "RecipeStarEntity(" + this.id + ")";
|
|
}
|
|
|
|
}
|