| import javax.persistence.*; |
| @Table(name = "UserVotes") |
| @AttributeOverride(name = "userId", column = @Column(name = "user_id")), |
| @AttributeOverride(name = "begId", column = @Column(name = "beg_id")), |
| @AttributeOverride(name = "seedId", column = @Column(name = "seed_id")) |
| @ManyToOne(optional = false) |
| @JoinColumn(name = "user_id", referencedColumnName = "user_id", foreignKey = @ForeignKey(name = "fk_user_votes_user"), insertable = false, updatable = false) |
| @ManyToOne(optional = false) |
| @JoinColumn(name = "beg_id", referencedColumnName = "beg_id", foreignKey = @ForeignKey(name = "fk_user_votes_beg"), insertable = false, updatable = false) |
| @ManyToOne(optional = false) |
| @JoinColumn(name = "seed_id", referencedColumnName = "seed_id", foreignKey = @ForeignKey(name = "fk_user_votes_seed"), insertable = false, updatable = false) |
| @Column(name = "created_at", nullable = false) |
| @Temporal(TemporalType.TIMESTAMP) |