mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-15 04:02:53 +00:00
[AB-62] adding server id to more tables for easier joins and fixing structure at more places
This commit is contained in:
@@ -27,7 +27,7 @@ public class AllowedInviteLink {
|
||||
@Column(name = "code")
|
||||
private String code;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "server_id", nullable = false)
|
||||
private AServer server;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class FilteredInviteLink {
|
||||
@Column(name = "code")
|
||||
private String code;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "server_id", nullable = false)
|
||||
private AServer server;
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@ public class Mute implements Serializable {
|
||||
/**
|
||||
* The {@link AUserInAServer} which was muted
|
||||
*/
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "muted_user_in_server_id", nullable = false)
|
||||
private AUserInAServer mutedUser;
|
||||
|
||||
/**
|
||||
* The {@link AUserInAServer} which casted the mute
|
||||
*/
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "muting_user_in_server_id", nullable = false)
|
||||
private AUserInAServer mutingUser;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Mute implements Serializable {
|
||||
/**
|
||||
* The channel in which this mute was cast
|
||||
*/
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "mutingChannel", nullable = false)
|
||||
private AChannel mutingChannel;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class UserNote implements Serializable {
|
||||
@JoinColumn(name = "server_id", referencedColumnName = "id", nullable = false)
|
||||
private AServer server;
|
||||
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "user_in_server_id", nullable = false)
|
||||
private AUserInAServer user;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Warning implements Serializable {
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "warned_user_in_server_id", nullable = false)
|
||||
private AUserInAServer warnedUser;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Warning implements Serializable {
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "warning_user_in_server_id", nullable = false)
|
||||
private AUserInAServer warningUser;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user