diff --git a/Iceshrimp.Backend/Core/Database/Tables/AbuseUserReport.cs b/Iceshrimp.Backend/Core/Database/Tables/AbuseUserReport.cs index 93e30ac1..3cb02bc5 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/AbuseUserReport.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/AbuseUserReport.cs @@ -58,15 +58,15 @@ public class AbuseUserReport [Column("forwarded")] public bool Forwarded { get; set; } - [ForeignKey("AssigneeId")] + [ForeignKey(nameof(AssigneeId))] [InverseProperty(nameof(User.AbuseUserReportAssignees))] public virtual User? Assignee { get; set; } - [ForeignKey("ReporterId")] + [ForeignKey(nameof(ReporterId))] [InverseProperty(nameof(User.AbuseUserReportReporters))] public virtual User Reporter { get; set; } = null!; - [ForeignKey("TargetUserId")] + [ForeignKey(nameof(TargetUserId))] [InverseProperty(nameof(User.AbuseUserReportTargetUsers))] public virtual User TargetUser { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/AnnouncementRead.cs b/Iceshrimp.Backend/Core/Database/Tables/AnnouncementRead.cs index f6e914bd..5cbc81c1 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/AnnouncementRead.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/AnnouncementRead.cs @@ -27,11 +27,11 @@ public class AnnouncementRead [Column("createdAt")] public DateTime CreatedAt { get; set; } - [ForeignKey("AnnouncementId")] + [ForeignKey(nameof(AnnouncementId))] [InverseProperty(nameof(Tables.Announcement.AnnouncementReads))] public virtual Announcement Announcement { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.AnnouncementReads))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Antenna.cs b/Iceshrimp.Backend/Core/Database/Tables/Antenna.cs index b3de776d..a147962b 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Antenna.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Antenna.cs @@ -80,15 +80,15 @@ public class Antenna [Column("instances", TypeName = "jsonb")] public List Instances { get; set; } = []; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Antennas))] public virtual User User { get; set; } = null!; - [ForeignKey("UserGroupMemberId")] + [ForeignKey(nameof(UserGroupMemberId))] [InverseProperty(nameof(Tables.UserGroupMember.Antennas))] public virtual UserGroupMember? UserGroupMember { get; set; } - [ForeignKey("UserListId")] + [ForeignKey(nameof(UserListId))] [InverseProperty(nameof(Tables.UserList.Antennas))] public virtual UserList? UserList { get; set; } } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/AttestationChallenge.cs b/Iceshrimp.Backend/Core/Database/Tables/AttestationChallenge.cs index ae8a3ac6..32bf75e7 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/AttestationChallenge.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/AttestationChallenge.cs @@ -40,7 +40,7 @@ public class AttestationChallenge [Column("registrationChallenge")] public bool RegistrationChallenge { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.AttestationChallenges))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Bite.cs b/Iceshrimp.Backend/Core/Database/Tables/Bite.cs index a7a5ebec..fa16b12c 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Bite.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Bite.cs @@ -40,10 +40,10 @@ public class Bite [StringLength(32)] public string? TargetBiteId { get; set; } - [ForeignKey("UserId")] public virtual User User { get; set; } = null!; - [ForeignKey("TargetUserId")] public virtual User? TargetUser { get; set; } - [ForeignKey("TargetNoteId")] public virtual Note? TargetNote { get; set; } - [ForeignKey("TargetBiteId")] public virtual Bite? TargetBite { get; set; } + [ForeignKey(nameof(UserId))] public virtual User User { get; set; } = null!; + [ForeignKey(nameof(TargetUserId))] public virtual User? TargetUser { get; set; } + [ForeignKey(nameof(TargetNoteId))] public virtual Note? TargetNote { get; set; } + [ForeignKey(nameof(TargetBiteId))] public virtual Bite? TargetBite { get; set; } public static string GetIdFromPublicUri(string uri, Config.InstanceSection config) => GetIdFromPublicUri(uri, config.WebDomain); diff --git a/Iceshrimp.Backend/Core/Database/Tables/Blocking.cs b/Iceshrimp.Backend/Core/Database/Tables/Blocking.cs index ad09c933..51829a10 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Blocking.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Blocking.cs @@ -36,11 +36,11 @@ public class Blocking [StringLength(32)] public string BlockerId { get; set; } = null!; - [ForeignKey("BlockeeId")] + [ForeignKey(nameof(BlockeeId))] [InverseProperty(nameof(User.IncomingBlocks))] public virtual User Blockee { get; set; } = null!; - [ForeignKey("BlockerId")] + [ForeignKey(nameof(BlockerId))] [InverseProperty(nameof(User.OutgoingBlocks))] public virtual User Blocker { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Channel.cs b/Iceshrimp.Backend/Core/Database/Tables/Channel.cs index 108b812d..b15258ad 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Channel.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Channel.cs @@ -65,7 +65,7 @@ public class Channel [Column("usersCount")] public int UsersCount { get; set; } - [ForeignKey("BannerId")] + [ForeignKey(nameof(BannerId))] [InverseProperty(nameof(DriveFile.Channels))] public virtual DriveFile? Banner { get; set; } @@ -78,7 +78,7 @@ public class Channel [InverseProperty(nameof(Note.Channel))] public virtual ICollection Notes { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Channels))] public virtual User? User { get; set; } } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/ChannelFollowing.cs b/Iceshrimp.Backend/Core/Database/Tables/ChannelFollowing.cs index 429d77ed..025c633b 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/ChannelFollowing.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/ChannelFollowing.cs @@ -36,11 +36,11 @@ public class ChannelFollowing [StringLength(32)] public string FollowerId { get; set; } = null!; - [ForeignKey("FolloweeId")] + [ForeignKey(nameof(FolloweeId))] [InverseProperty(nameof(Channel.ChannelFollowings))] public virtual Channel Followee { get; set; } = null!; - [ForeignKey("FollowerId")] + [ForeignKey(nameof(FollowerId))] [InverseProperty(nameof(User.ChannelFollowings))] public virtual User Follower { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/ChannelNotePin.cs b/Iceshrimp.Backend/Core/Database/Tables/ChannelNotePin.cs index 7f6d650b..12ca1fd1 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/ChannelNotePin.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/ChannelNotePin.cs @@ -26,11 +26,11 @@ public class ChannelNotePin [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; - [ForeignKey("ChannelId")] + [ForeignKey(nameof(ChannelId))] [InverseProperty(nameof(Tables.Channel.ChannelNotePins))] public virtual Channel Channel { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.ChannelNotePins))] public virtual Note Note { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Clip.cs b/Iceshrimp.Backend/Core/Database/Tables/Clip.cs index 5587c9ce..2d88f4fb 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Clip.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Clip.cs @@ -45,7 +45,7 @@ public class Clip [InverseProperty(nameof(ClipNote.Clip))] public virtual ICollection ClipNotes { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Clips))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/ClipNote.cs b/Iceshrimp.Backend/Core/Database/Tables/ClipNote.cs index 7d9a7fee..0af54625 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/ClipNote.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/ClipNote.cs @@ -29,11 +29,11 @@ public class ClipNote [StringLength(32)] public string ClipId { get; set; } = null!; - [ForeignKey("ClipId")] + [ForeignKey(nameof(ClipId))] [InverseProperty(nameof(Tables.Clip.ClipNotes))] public virtual Clip Clip { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.ClipNotes))] public virtual Note Note { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/DriveFile.cs b/Iceshrimp.Backend/Core/Database/Tables/DriveFile.cs index 26e8afc2..12ff4cb9 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/DriveFile.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/DriveFile.cs @@ -164,7 +164,7 @@ public class DriveFile : IEntity [InverseProperty(nameof(Channel.Banner))] public virtual ICollection Channels { get; set; } = new List(); - [ForeignKey("FolderId")] + [ForeignKey(nameof(FolderId))] [InverseProperty(nameof(DriveFolder.DriveFiles))] public virtual DriveFolder? Folder { get; set; } @@ -174,7 +174,7 @@ public class DriveFile : IEntity [InverseProperty(nameof(Page.EyeCatchingImage))] public virtual ICollection Pages { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.DriveFiles))] public virtual User? User { get; set; } diff --git a/Iceshrimp.Backend/Core/Database/Tables/DriveFolder.cs b/Iceshrimp.Backend/Core/Database/Tables/DriveFolder.cs index 155f6533..700ab699 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/DriveFolder.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/DriveFolder.cs @@ -48,11 +48,11 @@ public class DriveFolder [InverseProperty(nameof(Parent))] public virtual ICollection InverseParent { get; set; } = new List(); - [ForeignKey("ParentId")] + [ForeignKey(nameof(ParentId))] [InverseProperty(nameof(InverseParent))] public virtual DriveFolder? Parent { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.DriveFolders))] public virtual User? User { get; set; } } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/FollowRequest.cs b/Iceshrimp.Backend/Core/Database/Tables/FollowRequest.cs index cadd60c6..fee14946 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/FollowRequest.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/FollowRequest.cs @@ -79,11 +79,11 @@ public class FollowRequest : IEntity [StringLength(512)] public string? FolloweeSharedInbox { get; set; } - [ForeignKey("FolloweeId")] + [ForeignKey(nameof(FolloweeId))] [InverseProperty(nameof(User.IncomingFollowRequests))] public virtual User Followee { get; set; } = null!; - [ForeignKey("FollowerId")] + [ForeignKey(nameof(FollowerId))] [InverseProperty(nameof(User.OutgoingFollowRequests))] public virtual User Follower { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/Following.cs b/Iceshrimp.Backend/Core/Database/Tables/Following.cs index 7bf87d60..bd36c80a 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Following.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Following.cs @@ -80,11 +80,11 @@ public class Following [StringLength(512)] public string? FolloweeSharedInbox { get; set; } - [ForeignKey("FolloweeId")] + [ForeignKey(nameof(FolloweeId))] [InverseProperty(nameof(User.IncomingFollowRelationships))] public virtual User Followee { get; set; } = null!; - [ForeignKey("FollowerId")] + [ForeignKey(nameof(FollowerId))] [InverseProperty(nameof(User.OutgoingFollowRelationships))] public virtual User Follower { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/GalleryLike.cs b/Iceshrimp.Backend/Core/Database/Tables/GalleryLike.cs index 36d3c544..da9c253f 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/GalleryLike.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/GalleryLike.cs @@ -20,11 +20,11 @@ public class GalleryLike [Column("postId")] [StringLength(32)] public string PostId { get; set; } = null!; - [ForeignKey("PostId")] + [ForeignKey(nameof(PostId))] [InverseProperty(nameof(GalleryPost.GalleryLikes))] public virtual GalleryPost Post { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.GalleryLikes))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/GalleryPost.cs b/Iceshrimp.Backend/Core/Database/Tables/GalleryPost.cs index 0dac7cfd..7fb34ea6 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/GalleryPost.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/GalleryPost.cs @@ -61,7 +61,7 @@ public class GalleryPost [InverseProperty(nameof(GalleryLike.Post))] public virtual ICollection GalleryLikes { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.GalleryPosts))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Marker.cs b/Iceshrimp.Backend/Core/Database/Tables/Marker.cs index ea0414dc..8cd65c41 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Marker.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Marker.cs @@ -30,7 +30,7 @@ public class Marker [Column("lastUpdated")] public DateTime LastUpdatedAt { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Markers))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/MessagingMessage.cs b/Iceshrimp.Backend/Core/Database/Tables/MessagingMessage.cs index bc296742..98c4b4eb 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/MessagingMessage.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/MessagingMessage.cs @@ -54,19 +54,19 @@ public class MessagingMessage [Column("uri")] [StringLength(512)] public string? Uri { get; set; } - [ForeignKey("FileId")] + [ForeignKey(nameof(FileId))] [InverseProperty(nameof(DriveFile.MessagingMessages))] public virtual DriveFile? File { get; set; } - [ForeignKey("GroupId")] + [ForeignKey(nameof(GroupId))] [InverseProperty(nameof(UserGroup.MessagingMessages))] public virtual UserGroup? Group { get; set; } - [ForeignKey("RecipientId")] + [ForeignKey(nameof(RecipientId))] [InverseProperty(nameof(Tables.User.MessagingMessageRecipients))] public virtual User? Recipient { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.MessagingMessageUsers))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/ModerationLog.cs b/Iceshrimp.Backend/Core/Database/Tables/ModerationLog.cs index 756c1948..0e26fe9f 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/ModerationLog.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/ModerationLog.cs @@ -26,7 +26,7 @@ public class ModerationLog //TODO: refactor this column (it's currently a Dictionary, which is terrible) [Column("info", TypeName = "jsonb")] public string Info { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.ModerationLogs))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Muting.cs b/Iceshrimp.Backend/Core/Database/Tables/Muting.cs index d5607e22..d09ceba4 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Muting.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Muting.cs @@ -39,11 +39,11 @@ public class Muting [Column("expiresAt")] public DateTime? ExpiresAt { get; set; } - [ForeignKey("MuteeId")] + [ForeignKey(nameof(MuteeId))] [InverseProperty(nameof(User.IncomingMutes))] public virtual User Mutee { get; set; } = null!; - [ForeignKey("MuterId")] + [ForeignKey(nameof(MuterId))] [InverseProperty(nameof(User.OutgoingMutes))] public virtual User Muter { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Note.cs b/Iceshrimp.Backend/Core/Database/Tables/Note.cs index 8bf89f0e..eee237f9 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Note.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Note.cs @@ -189,7 +189,7 @@ public class Note : IEntity [Column("updatedAt")] public DateTime? UpdatedAt { get; set; } - [ForeignKey("ChannelId")] + [ForeignKey(nameof(ChannelId))] [InverseProperty(nameof(Tables.Channel.Notes))] public virtual Channel? Channel { get; set; } @@ -236,11 +236,11 @@ public class Note : IEntity [InverseProperty(nameof(PromoRead.Note))] public virtual ICollection PromoReads { get; set; } = new List(); - [ForeignKey("RenoteId")] + [ForeignKey(nameof(RenoteId))] [InverseProperty(nameof(InverseRenote))] public virtual Note? Renote { get; set; } - [ForeignKey("ReplyId")] + [ForeignKey(nameof(ReplyId))] [InverseProperty(nameof(InverseReply))] public virtual Note? Reply { get; set; } @@ -254,7 +254,7 @@ public class Note : IEntity [Projectable] public bool IsQuote => (RenoteId != null || Renote != null) && (Text != null || HasPoll || FileIds.Count > 0); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Notes))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteBookmark.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteBookmark.cs index b3fa7a37..5ad35de4 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteBookmark.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteBookmark.cs @@ -24,11 +24,11 @@ public class NoteBookmark [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteBookmarks))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.NoteBookmarks))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteEdit.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteEdit.cs index 9ee9df1a..90037e47 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteEdit.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteEdit.cs @@ -33,7 +33,7 @@ public class NoteEdit [Column("updatedAt")] public DateTime UpdatedAt { get; set; } - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteEdits))] public virtual Note Note { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteLike.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteLike.cs index 77d1bbe7..9b0d6ea6 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteLike.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteLike.cs @@ -21,11 +21,11 @@ public class NoteLike [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteLikes))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.NoteLikes))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteReaction.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteReaction.cs index 5ff7b49f..906b8e33 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteReaction.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteReaction.cs @@ -30,11 +30,11 @@ public class NoteReaction [StringLength(260)] public string Reaction { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteReactions))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.NoteReactions))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteThreadMuting.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteThreadMuting.cs index 87ff4272..65021607 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteThreadMuting.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteThreadMuting.cs @@ -23,7 +23,7 @@ public class NoteThreadMuting [StringLength(256)] public string ThreadId { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.NoteThreadMutings))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteUnread.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteUnread.cs index 5abf624a..662aaf12 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteUnread.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteUnread.cs @@ -41,11 +41,11 @@ public class NoteUnread [StringLength(32)] public string? NoteChannelId { get; set; } - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteUnreads))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.NoteUnreads))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/NoteWatching.cs b/Iceshrimp.Backend/Core/Database/Tables/NoteWatching.cs index 5d46cc03..95c982e9 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/NoteWatching.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/NoteWatching.cs @@ -44,11 +44,11 @@ public class NoteWatching [StringLength(32)] public string NoteUserId { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteWatchings))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.NoteWatchings))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Notification.cs b/Iceshrimp.Backend/Core/Database/Tables/Notification.cs index 34d3c872..fe29b04a 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Notification.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Notification.cs @@ -96,25 +96,25 @@ public class Notification : IEntity [StringLength(32)] public string? AppAccessTokenId { get; set; } - [ForeignKey("FollowRequestId")] + [ForeignKey(nameof(FollowRequestId))] [InverseProperty(nameof(Tables.FollowRequest.Notifications))] public virtual FollowRequest? FollowRequest { get; set; } - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.Notifications))] public virtual Note? Note { get; set; } - [ForeignKey("BiteId")] public virtual Bite? Bite { get; set; } + [ForeignKey(nameof(BiteId))] public virtual Bite? Bite { get; set; } - [ForeignKey("NotifieeId")] + [ForeignKey(nameof(NotifieeId))] [InverseProperty(nameof(User.NotificationNotifiees))] public virtual User Notifiee { get; set; } = null!; - [ForeignKey("NotifierId")] + [ForeignKey(nameof(NotifierId))] [InverseProperty(nameof(User.NotificationNotifiers))] public virtual User? Notifier { get; set; } - [ForeignKey("UserGroupInvitationId")] + [ForeignKey(nameof(UserGroupInvitationId))] [InverseProperty(nameof(Tables.UserGroupInvitation.Notifications))] public virtual UserGroupInvitation? UserGroupInvitation { get; set; } diff --git a/Iceshrimp.Backend/Core/Database/Tables/OauthToken.cs b/Iceshrimp.Backend/Core/Database/Tables/OauthToken.cs index bb858338..b261350d 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/OauthToken.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/OauthToken.cs @@ -57,11 +57,11 @@ public class OauthToken [StringLength(512)] public string RedirectUri { get; set; } = null!; - [ForeignKey("AppId")] + [ForeignKey(nameof(AppId))] [InverseProperty(nameof(OauthApp.OauthTokens))] public virtual OauthApp App { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.OauthTokens))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/Page.cs b/Iceshrimp.Backend/Core/Database/Tables/Page.cs index 7182070a..cc19a555 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Page.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Page.cs @@ -85,14 +85,14 @@ public class Page [Column("isPublic")] public bool IsPublic { get; set; } - [ForeignKey("EyeCatchingImageId")] + [ForeignKey(nameof(EyeCatchingImageId))] [InverseProperty(nameof(DriveFile.Pages))] public virtual DriveFile? EyeCatchingImage { get; set; } [InverseProperty(nameof(PageLike.Page))] public virtual ICollection PageLikes { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Pages))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/PageLike.cs b/Iceshrimp.Backend/Core/Database/Tables/PageLike.cs index eeef0504..e5f04bc6 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/PageLike.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/PageLike.cs @@ -20,11 +20,11 @@ public class PageLike [Column("pageId")] [StringLength(32)] public string PageId { get; set; } = null!; - [ForeignKey("PageId")] + [ForeignKey(nameof(PageId))] [InverseProperty(nameof(Tables.Page.PageLikes))] public virtual Page Page { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.PageLikes))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/PasswordResetRequest.cs b/Iceshrimp.Backend/Core/Database/Tables/PasswordResetRequest.cs index 5d23c4a1..2004fb7e 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/PasswordResetRequest.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/PasswordResetRequest.cs @@ -20,7 +20,7 @@ public class PasswordResetRequest [Column("userId")] [StringLength(32)] public string UserId { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.PasswordResetRequests))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Poll.cs b/Iceshrimp.Backend/Core/Database/Tables/Poll.cs index 010784c9..aba7896e 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Poll.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Poll.cs @@ -37,7 +37,7 @@ public class Poll [StringLength(512)] public string? UserHost { get; set; } - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.Poll))] public virtual Note Note { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/PollVote.cs b/Iceshrimp.Backend/Core/Database/Tables/PollVote.cs index 5d055393..0393565e 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/PollVote.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/PollVote.cs @@ -28,11 +28,11 @@ public class PollVote [Column("choice")] public int Choice { get; set; } - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.PollVotes))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.PollVotes))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/PromoNote.cs b/Iceshrimp.Backend/Core/Database/Tables/PromoNote.cs index 9e5eeddd..25d7984a 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/PromoNote.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/PromoNote.cs @@ -22,7 +22,7 @@ public class PromoNote [StringLength(32)] public string UserId { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.PromoNote))] public virtual Note Note { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/PromoRead.cs b/Iceshrimp.Backend/Core/Database/Tables/PromoRead.cs index 70523b1a..717f8bd9 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/PromoRead.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/PromoRead.cs @@ -24,11 +24,11 @@ public class PromoRead [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.PromoReads))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.PromoReads))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/PushSubscription.cs b/Iceshrimp.Backend/Core/Database/Tables/PushSubscription.cs index 6b80c721..05045ab2 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/PushSubscription.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/PushSubscription.cs @@ -47,11 +47,11 @@ public class PushSubscription [Column("policy")] public PushPolicy Policy { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.PushSubscriptions))] public virtual User User { get; set; } = null!; - [ForeignKey("OauthTokenId")] + [ForeignKey(nameof(OauthTokenId))] [InverseProperty(nameof(Tables.OauthToken.PushSubscription))] public virtual OauthToken OauthToken { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/RegistryItem.cs b/Iceshrimp.Backend/Core/Database/Tables/RegistryItem.cs index caacc9c9..3187c548 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/RegistryItem.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/RegistryItem.cs @@ -53,7 +53,7 @@ public class RegistryItem [Column("value", TypeName = "jsonb")] public string? Value { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.RegistryItems))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/RenoteMuting.cs b/Iceshrimp.Backend/Core/Database/Tables/RenoteMuting.cs index 1d107fec..f239259b 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/RenoteMuting.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/RenoteMuting.cs @@ -36,11 +36,11 @@ public class RenoteMuting [StringLength(32)] public string MuterId { get; set; } = null!; - [ForeignKey("MuteeId")] + [ForeignKey(nameof(MuteeId))] [InverseProperty(nameof(User.RenoteMutingMutees))] public virtual User Mutee { get; set; } = null!; - [ForeignKey("MuterId")] + [ForeignKey(nameof(MuterId))] [InverseProperty(nameof(User.RenoteMutingMuters))] public virtual User Muter { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/Session.cs b/Iceshrimp.Backend/Core/Database/Tables/Session.cs index 42a4dc7c..42c93c4d 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Session.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Session.cs @@ -34,7 +34,7 @@ public class Session [Column("active")] public bool Active { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Sessions))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/SwSubscription.cs b/Iceshrimp.Backend/Core/Database/Tables/SwSubscription.cs index ecc474db..91d6e29b 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/SwSubscription.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/SwSubscription.cs @@ -29,7 +29,7 @@ public class SwSubscription [Column("sendReadMessage")] public bool SendReadMessage { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.SwSubscriptions))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/User.cs b/Iceshrimp.Backend/Core/Database/Tables/User.cs index 13d77a63..a742d3db 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/User.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/User.cs @@ -288,11 +288,11 @@ public class User : IEntity public virtual ICollection AttestationChallenges { get; set; } = new List(); - [ForeignKey("AvatarId")] + [ForeignKey(nameof(AvatarId))] [InverseProperty(nameof(DriveFile.UserAvatar))] public virtual DriveFile? Avatar { get; set; } - [ForeignKey("BannerId")] + [ForeignKey(nameof(BannerId))] [InverseProperty(nameof(DriveFile.UserBanner))] public virtual DriveFile? Banner { get; set; } diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserGroup.cs b/Iceshrimp.Backend/Core/Database/Tables/UserGroup.cs index 1f0696c3..39658ff1 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserGroup.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserGroup.cs @@ -34,7 +34,7 @@ public class UserGroup [InverseProperty(nameof(MessagingMessage.Group))] public virtual ICollection MessagingMessages { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserGroups))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserGroupInvitation.cs b/Iceshrimp.Backend/Core/Database/Tables/UserGroupInvitation.cs index 0f509c78..05bb583f 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserGroupInvitation.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserGroupInvitation.cs @@ -38,11 +38,11 @@ public class UserGroupInvitation [InverseProperty(nameof(Notification.UserGroupInvitation))] public virtual ICollection Notifications { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserGroupInvitations))] public virtual User User { get; set; } = null!; - [ForeignKey("UserGroupId")] + [ForeignKey(nameof(UserGroupId))] [InverseProperty(nameof(Tables.UserGroup.UserGroupInvitations))] public virtual UserGroup UserGroup { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserGroupMember.cs b/Iceshrimp.Backend/Core/Database/Tables/UserGroupMember.cs index 636589f2..14f3d440 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserGroupMember.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserGroupMember.cs @@ -38,11 +38,11 @@ public class UserGroupMember [InverseProperty(nameof(Antenna.UserGroupMember))] public virtual ICollection Antennas { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserGroupMemberships))] public virtual User User { get; set; } = null!; - [ForeignKey("UserGroupId")] + [ForeignKey(nameof(UserGroupId))] [InverseProperty(nameof(Tables.UserGroup.UserGroupMembers))] public virtual UserGroup UserGroup { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserKeypair.cs b/Iceshrimp.Backend/Core/Database/Tables/UserKeypair.cs index b8ba062b..7fa8e174 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserKeypair.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserKeypair.cs @@ -19,7 +19,7 @@ public class UserKeypair [StringLength(4096)] public string PrivateKey { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserKeypair))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserList.cs b/Iceshrimp.Backend/Core/Database/Tables/UserList.cs index 60201812..a29c1dcb 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserList.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserList.cs @@ -42,7 +42,7 @@ public class UserList [InverseProperty(nameof(Antenna.UserList))] public virtual ICollection Antennas { get; set; } = new List(); - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserLists))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserListMember.cs b/Iceshrimp.Backend/Core/Database/Tables/UserListMember.cs index 6b0aa39b..9a661d42 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserListMember.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserListMember.cs @@ -30,11 +30,11 @@ public class UserListMember : IEntity [StringLength(32)] public string UserListId { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserListMembers))] public virtual User User { get; set; } = null!; - [ForeignKey("UserListId")] + [ForeignKey(nameof(UserListId))] [InverseProperty(nameof(Tables.UserList.UserListMembers))] public virtual UserList UserList { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserNotePin.cs b/Iceshrimp.Backend/Core/Database/Tables/UserNotePin.cs index 7a858a0b..ad3bfffd 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserNotePin.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserNotePin.cs @@ -24,11 +24,11 @@ public class UserNotePin [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; - [ForeignKey("NoteId")] + [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.UserNotePins))] public virtual Note Note { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserNotePins))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserProfile.cs b/Iceshrimp.Backend/Core/Database/Tables/UserProfile.cs index 0d8fc742..c799b171 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserProfile.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserProfile.cs @@ -170,11 +170,11 @@ public class UserProfile [Column("mentions", TypeName = "jsonb")] public List Mentions { get; set; } = null!; - [ForeignKey("PinnedPageId")] + [ForeignKey(nameof(PinnedPageId))] [InverseProperty(nameof(Page.UserProfile))] public virtual Page? PinnedPage { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserProfile))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserPublickey.cs b/Iceshrimp.Backend/Core/Database/Tables/UserPublickey.cs index f8c599f8..9c42d747 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserPublickey.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserPublickey.cs @@ -19,7 +19,7 @@ public class UserPublickey [StringLength(4096)] public string KeyPem { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserPublickey))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserSecurityKey.cs b/Iceshrimp.Backend/Core/Database/Tables/UserSecurityKey.cs index db5b66bf..a2e24946 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserSecurityKey.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserSecurityKey.cs @@ -37,7 +37,7 @@ public class UserSecurityKey [StringLength(30)] public string Name { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserSecurityKeys))] public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Database/Tables/UserSettings.cs b/Iceshrimp.Backend/Core/Database/Tables/UserSettings.cs index e184df8e..fddc9e88 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/UserSettings.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/UserSettings.cs @@ -11,7 +11,7 @@ public class UserSettings [StringLength(32)] public string UserId { get; set; } = null!; - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.UserSettings))] public virtual User User { get; set; } = null!; diff --git a/Iceshrimp.Backend/Core/Database/Tables/Webhook.cs b/Iceshrimp.Backend/Core/Database/Tables/Webhook.cs index 7d05ba1f..bfb86f13 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Webhook.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Webhook.cs @@ -50,7 +50,7 @@ public class Webhook [Column("latestStatus")] public int? LatestStatus { get; set; } - [ForeignKey("UserId")] + [ForeignKey(nameof(UserId))] [InverseProperty(nameof(Tables.User.Webhooks))] public virtual User User { get; set; } = null!; } \ No newline at end of file