Changed date to PRIMARY KEY
This commit is contained in:
parent
f0e89184a4
commit
8ffaf525eb
@ -20,6 +20,8 @@ public class UserEvent {
|
|||||||
@JoinColumn(name = "event_id", referencedColumnName = "id")
|
@JoinColumn(name = "event_id", referencedColumnName = "id")
|
||||||
private Event event;
|
private Event event;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name="date", columnDefinition = "DATE DEFAULT CURRENT_DATE", nullable = false)
|
||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package com.vpr.server;
|
package com.vpr.server;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.sql.Date;
|
||||||
|
|
||||||
public class UserEventId implements Serializable {
|
public class UserEventId implements Serializable {
|
||||||
private long user;
|
private long user;
|
||||||
private long event;
|
private long event;
|
||||||
|
private Date date;
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* Getter and Setter *
|
* Getter and Setter *
|
||||||
@ -25,4 +27,12 @@ public class UserEventId implements Serializable {
|
|||||||
public void setEvent(long event) {
|
public void setEvent(long event) {
|
||||||
this.event = event;
|
this.event = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(Date date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user