Matthias Andreas Benkard | d9b9588 | 2020-01-24 11:42:49 +0100 | [diff] [blame^] | 1 | package eu.mulk.mulkcms2.benki.users; |
| 2 | |
| 3 | import eu.mulk.mulkcms2.benki.accesscontrol.PageKey; |
| 4 | import eu.mulk.mulkcms2.benki.accesscontrol.Role; |
| 5 | import eu.mulk.mulkcms2.benki.bookmarx.Bookmark; |
| 6 | import eu.mulk.mulkcms2.benki.generic.Post; |
| 7 | import eu.mulk.mulkcms2.benki.lafargue.LazychatMessage; |
| 8 | import eu.mulk.mulkcms2.benki.wiki.WikiPageRevision; |
| 9 | import io.quarkus.hibernate.orm.panache.PanacheEntityBase; |
| 10 | import java.util.Collection; |
| 11 | import javax.persistence.Column; |
| 12 | import javax.persistence.Entity; |
| 13 | import javax.persistence.Id; |
| 14 | import javax.persistence.JoinColumn; |
| 15 | import javax.persistence.ManyToOne; |
| 16 | import javax.persistence.OneToMany; |
| 17 | import javax.persistence.Table; |
| 18 | |
| 19 | @Entity(name = "BenkiUser") |
| 20 | @Table(name = "users", schema = "public", catalog = "benki") |
| 21 | public class User extends PanacheEntityBase { |
| 22 | |
| 23 | @Id |
| 24 | @Column(name = "id", nullable = false) |
| 25 | public int id; |
| 26 | |
| 27 | @Column(name = "first_name", nullable = true, length = -1) |
| 28 | public String firstName; |
| 29 | |
| 30 | @Column(name = "middle_names", nullable = true, length = -1) |
| 31 | public String middleNames; |
| 32 | |
| 33 | @Column(name = "last_name", nullable = true, length = -1) |
| 34 | public String lastName; |
| 35 | |
| 36 | @Column(name = "email", nullable = true, length = -1) |
| 37 | public String email; |
| 38 | |
| 39 | @Column(name = "website", nullable = true, length = -1) |
| 40 | public String website; |
| 41 | |
| 42 | @Column(name = "status", nullable = true, length = -1) |
| 43 | public String status; |
| 44 | |
| 45 | @OneToMany(mappedBy = "owner") |
| 46 | public Collection<Bookmark> bookmarks; |
| 47 | |
| 48 | @OneToMany(mappedBy = "owner") |
| 49 | public Collection<LazychatMessage> lazychatMessages; |
| 50 | |
| 51 | @OneToMany(mappedBy = "user") |
| 52 | public Collection<Openids> openids; |
| 53 | |
| 54 | @OneToMany(mappedBy = "user") |
| 55 | public Collection<PageKey> pageKeys; |
| 56 | |
| 57 | @OneToMany(mappedBy = "owner") |
| 58 | public Collection<Post> posts; |
| 59 | |
| 60 | @OneToMany(mappedBy = "user") |
| 61 | public Collection<UserDefaultTarget> defaultTargets; |
| 62 | |
| 63 | @OneToMany(mappedBy = "user") |
| 64 | public Collection<UserEmailAddress> emailAddresses; |
| 65 | |
| 66 | @OneToMany(mappedBy = "user") |
| 67 | public Collection<UserJid> jids; |
| 68 | |
| 69 | @OneToMany(mappedBy = "user") |
| 70 | public Collection<UserNickname> nicknames; |
| 71 | |
| 72 | @OneToMany(mappedBy = "user") |
| 73 | public Collection<UserRole> roles; |
| 74 | |
| 75 | @OneToMany(mappedBy = "user") |
| 76 | public Collection<UserRsaKey> rsaKeys; |
| 77 | |
| 78 | @ManyToOne |
| 79 | @JoinColumn(name = "role", referencedColumnName = "id", nullable = false) |
| 80 | public Role ownedRole; |
| 81 | |
| 82 | @OneToMany(mappedBy = "user") |
| 83 | public Collection<WebId> webids; |
| 84 | |
| 85 | @OneToMany(mappedBy = "author") |
| 86 | public Collection<WikiPageRevision> wikiPageRevisions; |
| 87 | } |