| package eu.mulk.mulkcms2.cms.pages; |
| |
| import io.quarkus.hibernate.orm.panache.PanacheEntityBase; |
| import java.util.Collection; |
| import javax.annotation.CheckForNull; |
| 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.OneToMany; |
| import javax.persistence.Table; |
| |
| @Entity |
| @Table(name = "article_types", schema = "public") |
| public class ArticleType extends PanacheEntityBase { |
| |
| @Id |
| @GeneratedValue(strategy = GenerationType.IDENTITY) |
| @Column(name = "id", nullable = false) |
| public Integer id; |
| |
| @Column(name = "name", nullable = true, length = -1) |
| @CheckForNull |
| public String name; |
| |
| @Column(name = "page_template", nullable = true, length = -1) |
| @CheckForNull |
| public String pageTemplate; |
| |
| @OneToMany(mappedBy = "type", fetch = FetchType.LAZY) |
| public Collection<Article> articles; |
| } |