Added column annotations to data classes
This commit is contained in:
parent
768c57a234
commit
f0e89184a4
@ -12,11 +12,22 @@ public class Event {
|
|||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
|
@Column(name="name", nullable=false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Column(name="priority", nullable=false)
|
||||||
private Integer priority;
|
private Integer priority;
|
||||||
|
|
||||||
|
@Column(name="is_full_day", nullable=false)
|
||||||
private boolean isFullDay;
|
private boolean isFullDay;
|
||||||
|
|
||||||
|
@Column(name="is_private", nullable=false)
|
||||||
private boolean isPrivate;
|
private boolean isPrivate;
|
||||||
|
|
||||||
|
@Column(name="start")
|
||||||
private Time start;
|
private Time start;
|
||||||
|
|
||||||
|
@Column(name="end")
|
||||||
private Time end;
|
private Time end;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "event")
|
@OneToMany(mappedBy = "event")
|
||||||
|
@ -11,10 +11,19 @@ public class User {
|
|||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
|
@Column(name="name", nullable=false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Column(name="forename", nullable=false)
|
||||||
private String forename;
|
private String forename;
|
||||||
|
|
||||||
|
@Column(name="password", nullable=false)
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@Column(name="token")
|
||||||
private String token;
|
private String token;
|
||||||
|
|
||||||
|
@Column(name="is_admin", nullable=false)
|
||||||
private boolean isAdmin;
|
private boolean isAdmin;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "user")
|
@OneToMany(mappedBy = "user")
|
||||||
|
Loading…
Reference in New Issue
Block a user