package io.trygvis.model; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity public class Article { @Id @SequenceGenerator(name="id_seq", sequenceName="id_seq") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "id_seq") private Integer id; private Date created; private Date updated; private String title; private String body; @SuppressWarnings("UnusedDeclaration") private Article() { } public Article(Date created, Date updated, String title, String body) { this.created = created; this.updated = updated; this.title = title; this.body = body; } public Integer getId() { return id; } public Date getCreated() { return created; } public Date getUpdated() { return updated; } public void setUpdated(Date updated) { this.updated = updated; } public String getTitle() { return title; } public String getBody() { return body; } }