[backend/database] Replace complex Index/PrimaryKey/ForeignKey references with their nameof() equivalents
This commit is contained in:
parent
9e11398938
commit
79c3a9c891
39 changed files with 43 additions and 43 deletions
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("announcement_read")]
|
[Table("announcement_read")]
|
||||||
[Index(nameof(AnnouncementId))]
|
[Index(nameof(AnnouncementId))]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("UserId", "AnnouncementId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(AnnouncementId), IsUnique = true)]
|
||||||
public class AnnouncementRead
|
public class AnnouncementRead
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[PrimaryKey("Id", "UserId")]
|
[PrimaryKey(nameof(Id), nameof(UserId))]
|
||||||
[Table("attestation_challenge")]
|
[Table("attestation_challenge")]
|
||||||
[Index(nameof(Challenge))]
|
[Index(nameof(Challenge))]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("blocking")]
|
[Table("blocking")]
|
||||||
[Index(nameof(BlockerId))]
|
[Index(nameof(BlockerId))]
|
||||||
[Index(nameof(BlockeeId))]
|
[Index(nameof(BlockeeId))]
|
||||||
[Index("BlockerId", "BlockeeId", IsUnique = true)]
|
[Index(nameof(BlockerId), nameof(BlockeeId), IsUnique = true)]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
public class Blocking
|
public class Blocking
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("channel_following")]
|
[Table("channel_following")]
|
||||||
[Index(nameof(FolloweeId))]
|
[Index(nameof(FolloweeId))]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
[Index("FollowerId", "FolloweeId", IsUnique = true)]
|
[Index(nameof(FollowerId), nameof(FolloweeId), IsUnique = true)]
|
||||||
[Index(nameof(FollowerId))]
|
[Index(nameof(FollowerId))]
|
||||||
public class ChannelFollowing
|
public class ChannelFollowing
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("channel_note_pin")]
|
[Table("channel_note_pin")]
|
||||||
[Index(nameof(ChannelId))]
|
[Index(nameof(ChannelId))]
|
||||||
[Index("ChannelId", "NoteId", IsUnique = true)]
|
[Index(nameof(ChannelId), nameof(NoteId), IsUnique = true)]
|
||||||
public class ChannelNotePin
|
public class ChannelNotePin
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("clip_note")]
|
[Table("clip_note")]
|
||||||
[Index("NoteId", "ClipId", IsUnique = true)]
|
[Index(nameof(NoteId), nameof(ClipId), IsUnique = true)]
|
||||||
[Index(nameof(NoteId))]
|
[Index(nameof(NoteId))]
|
||||||
[Index(nameof(ClipId))]
|
[Index(nameof(ClipId))]
|
||||||
public class ClipNote
|
public class ClipNote
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("emoji")]
|
[Table("emoji")]
|
||||||
[Index("Name", "Host", IsUnique = true)]
|
[Index(nameof(Name), nameof(Host), IsUnique = true)]
|
||||||
[Index(nameof(Host))]
|
[Index(nameof(Host))]
|
||||||
[Index(nameof(Name))]
|
[Index(nameof(Name))]
|
||||||
public class Emoji
|
public class Emoji
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("follow_request")]
|
[Table("follow_request")]
|
||||||
[Index(nameof(FolloweeId))]
|
[Index(nameof(FolloweeId))]
|
||||||
[Index(nameof(FollowerId))]
|
[Index(nameof(FollowerId))]
|
||||||
[Index("FollowerId", "FolloweeId", IsUnique = true)]
|
[Index(nameof(FollowerId), nameof(FolloweeId), IsUnique = true)]
|
||||||
public class FollowRequest : IEntity
|
public class FollowRequest : IEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("following")]
|
[Table("following")]
|
||||||
[Index(nameof(FolloweeId))]
|
[Index(nameof(FolloweeId))]
|
||||||
[Index("FollowerId", "FolloweeId", IsUnique = true)]
|
[Index(nameof(FollowerId), nameof(FolloweeId), IsUnique = true)]
|
||||||
[Index(nameof(FollowerHost))]
|
[Index(nameof(FollowerHost))]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
[Index(nameof(FollowerId))]
|
[Index(nameof(FollowerId))]
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("gallery_like")]
|
[Table("gallery_like")]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("UserId", "PostId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(PostId), IsUnique = true)]
|
||||||
public class GalleryLike
|
public class GalleryLike
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("hashtag")]
|
[Table("hashtag")]
|
||||||
[Index("Name", IsUnique = true)]
|
[Index(nameof(Name), IsUnique = true)]
|
||||||
public class Hashtag : IEntity
|
public class Hashtag : IEntity
|
||||||
{
|
{
|
||||||
[Column("name")] [StringLength(128)] public string Name { get; set; } = null!;
|
[Column("name")] [StringLength(128)] public string Name { get; set; } = null!;
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("instance")]
|
[Table("instance")]
|
||||||
[Index(nameof(CaughtAt))]
|
[Index(nameof(CaughtAt))]
|
||||||
[Index(nameof(IsSuspended))]
|
[Index(nameof(IsSuspended))]
|
||||||
[Index("Host", IsUnique = true)]
|
[Index(nameof(Host), IsUnique = true)]
|
||||||
public class Instance
|
public class Instance
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -7,8 +7,8 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("marker")]
|
[Table("marker")]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("UserId", "Type", IsUnique = true)]
|
[Index(nameof(UserId), nameof(Type), IsUnique = true)]
|
||||||
[PrimaryKey("UserId", "Type")]
|
[PrimaryKey(nameof(UserId), nameof(Type))]
|
||||||
public class Marker
|
public class Marker
|
||||||
{
|
{
|
||||||
[PgName("marker_type_enum")]
|
[PgName("marker_type_enum")]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("muting")]
|
[Table("muting")]
|
||||||
[Index("MuterId", "MuteeId", IsUnique = true)]
|
[Index(nameof(MuterId), nameof(MuteeId), IsUnique = true)]
|
||||||
[Index(nameof(MuterId))]
|
[Index(nameof(MuterId))]
|
||||||
[Index(nameof(ExpiresAt))]
|
[Index(nameof(ExpiresAt))]
|
||||||
[Index(nameof(MuteeId))]
|
[Index(nameof(MuteeId))]
|
||||||
|
|
|
@ -11,7 +11,7 @@ using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("note")]
|
[Table("note")]
|
||||||
[Index("Uri", IsUnique = true)]
|
[Index(nameof(Uri), IsUnique = true)]
|
||||||
[Index(nameof(ReplyId))]
|
[Index(nameof(ReplyId))]
|
||||||
[Index(nameof(AttachedFileTypes))]
|
[Index(nameof(AttachedFileTypes))]
|
||||||
[Index(nameof(FileIds))]
|
[Index(nameof(FileIds))]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("note_bookmark")]
|
[Table("note_bookmark")]
|
||||||
[Index("UserId", "NoteId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class NoteBookmark
|
public class NoteBookmark
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("note_like")]
|
[Table("note_like")]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index(nameof(NoteId))]
|
[Index(nameof(NoteId))]
|
||||||
[Index("UserId", "NoteId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), IsUnique = true)]
|
||||||
public class NoteLike
|
public class NoteLike
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index(nameof(NoteId))]
|
[Index(nameof(NoteId))]
|
||||||
[Index("UserId", "NoteId", "Reaction", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), nameof(Reaction), IsUnique = true)]
|
||||||
public class NoteReaction
|
public class NoteReaction
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("note_thread_muting")]
|
[Table("note_thread_muting")]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("UserId", "ThreadId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(ThreadId), IsUnique = true)]
|
||||||
[Index(nameof(ThreadId))]
|
[Index(nameof(ThreadId))]
|
||||||
public class NoteThreadMuting
|
public class NoteThreadMuting
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index(nameof(NoteChannelId))]
|
[Index(nameof(NoteChannelId))]
|
||||||
[Index(nameof(IsSpecified))]
|
[Index(nameof(IsSpecified))]
|
||||||
[Index("UserId", "NoteId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), IsUnique = true)]
|
||||||
[Index(nameof(NoteId))]
|
[Index(nameof(NoteId))]
|
||||||
public class NoteUnread
|
public class NoteUnread
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Index(nameof(NoteId))]
|
[Index(nameof(NoteId))]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
[Index(nameof(NoteUserId))]
|
[Index(nameof(NoteUserId))]
|
||||||
[Index("UserId", "NoteId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class NoteWatching
|
public class NoteWatching
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("oauth_app")]
|
[Table("oauth_app")]
|
||||||
[Index("ClientId", IsUnique = true)]
|
[Index(nameof(ClientId), IsUnique = true)]
|
||||||
public class OauthApp
|
public class OauthApp
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -6,7 +6,7 @@ using NpgsqlTypes;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("page")]
|
[Table("page")]
|
||||||
[Index("UserId", "Name", IsUnique = true)]
|
[Index(nameof(UserId), nameof(Name), IsUnique = true)]
|
||||||
[Index(nameof(VisibleUserIds))]
|
[Index(nameof(VisibleUserIds))]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index(nameof(UpdatedAt))]
|
[Index(nameof(UpdatedAt))]
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("page_like")]
|
[Table("page_like")]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("UserId", "PageId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(PageId), IsUnique = true)]
|
||||||
public class PageLike
|
public class PageLike
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("password_reset_request")]
|
[Table("password_reset_request")]
|
||||||
[Index("Token", IsUnique = true)]
|
[Index(nameof(Token), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class PasswordResetRequest
|
public class PasswordResetRequest
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("poll_vote")]
|
[Table("poll_vote")]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
[Index("UserId", "NoteId", "Choice", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), nameof(Choice), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index(nameof(NoteId))]
|
[Index(nameof(NoteId))]
|
||||||
public class PollVote
|
public class PollVote
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("promo_read")]
|
[Table("promo_read")]
|
||||||
[Index("UserId", "NoteId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class PromoRead
|
public class PromoRead
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("push_subscription")]
|
[Table("push_subscription")]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("OauthTokenId", IsUnique = true)]
|
[Index(nameof(OauthTokenId), IsUnique = true)]
|
||||||
public class PushSubscription
|
public class PushSubscription
|
||||||
{
|
{
|
||||||
[PgName("push_subscription_policy_enum")]
|
[PgName("push_subscription_policy_enum")]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("registration_invite")]
|
[Table("registration_invite")]
|
||||||
[Index("Code", IsUnique = true)]
|
[Index(nameof(Code), IsUnique = true)]
|
||||||
public class RegistrationInvite
|
public class RegistrationInvite
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -6,7 +6,7 @@ using NpgsqlTypes;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("relay")]
|
[Table("relay")]
|
||||||
[Index("Inbox", IsUnique = true)]
|
[Index(nameof(Inbox), IsUnique = true)]
|
||||||
public class Relay
|
public class Relay
|
||||||
{
|
{
|
||||||
[PgName("relay_status_enum")]
|
[PgName("relay_status_enum")]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("renote_muting")]
|
[Table("renote_muting")]
|
||||||
[Index("MuterId", "MuteeId", IsUnique = true)]
|
[Index(nameof(MuterId), nameof(MuteeId), IsUnique = true)]
|
||||||
[Index(nameof(MuterId))]
|
[Index(nameof(MuterId))]
|
||||||
[Index(nameof(MuteeId))]
|
[Index(nameof(MuteeId))]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("user")]
|
[Table("user")]
|
||||||
[Index(nameof(Host))]
|
[Index(nameof(Host))]
|
||||||
[Index("UsernameLower", "Host", IsUnique = true)]
|
[Index(nameof(UsernameLower), nameof(Host), IsUnique = true)]
|
||||||
[Index(nameof(UpdatedAt))]
|
[Index(nameof(UpdatedAt))]
|
||||||
[Index(nameof(UsernameLower))]
|
[Index(nameof(UsernameLower))]
|
||||||
[Index(nameof(Uri))]
|
[Index(nameof(Uri))]
|
||||||
|
@ -20,9 +20,9 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Index(nameof(IsModerator))]
|
[Index(nameof(IsModerator))]
|
||||||
[Index(nameof(CreatedAt))]
|
[Index(nameof(CreatedAt))]
|
||||||
[Index(nameof(Tags))]
|
[Index(nameof(Tags))]
|
||||||
[Index("AvatarId", IsUnique = true)]
|
[Index(nameof(AvatarId), IsUnique = true)]
|
||||||
[Index("BannerId", IsUnique = true)]
|
[Index(nameof(BannerId), IsUnique = true)]
|
||||||
[Index("Token", IsUnique = true)]
|
[Index(nameof(Token), IsUnique = true)]
|
||||||
public class User : IEntity
|
public class User : IEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("user_group_invitation")]
|
[Table("user_group_invitation")]
|
||||||
[Index(nameof(UserGroupId))]
|
[Index(nameof(UserGroupId))]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
[Index("UserId", "UserGroupId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(UserGroupId), IsUnique = true)]
|
||||||
public class UserGroupInvitation
|
public class UserGroupInvitation
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("user_group_member")]
|
[Table("user_group_member")]
|
||||||
[Index(nameof(UserGroupId))]
|
[Index(nameof(UserGroupId))]
|
||||||
[Index("UserId", "UserGroupId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(UserGroupId), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class UserGroupMember
|
public class UserGroupMember
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("user_list_member")]
|
[Table("user_list_member")]
|
||||||
[Index(nameof(UserListId))]
|
[Index(nameof(UserListId))]
|
||||||
[Index("UserId", "UserListId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(UserListId), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class UserListMember : IEntity
|
public class UserListMember : IEntity
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("user_note_pin")]
|
[Table("user_note_pin")]
|
||||||
[Index("UserId", "NoteId", IsUnique = true)]
|
[Index(nameof(UserId), nameof(NoteId), IsUnique = true)]
|
||||||
[Index(nameof(UserId))]
|
[Index(nameof(UserId))]
|
||||||
public class UserNotePin
|
public class UserNotePin
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("user_pending")]
|
[Table("user_pending")]
|
||||||
[Index("Code", IsUnique = true)]
|
[Index(nameof(Code), IsUnique = true)]
|
||||||
public class UserPending
|
public class UserPending
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
[Table("user_profile")]
|
[Table("user_profile")]
|
||||||
[Index(nameof(EnableWordMute))]
|
[Index(nameof(EnableWordMute))]
|
||||||
[Index(nameof(UserHost))]
|
[Index(nameof(UserHost))]
|
||||||
[Index("PinnedPageId", IsUnique = true)]
|
[Index(nameof(PinnedPageId), IsUnique = true)]
|
||||||
public class UserProfile
|
public class UserProfile
|
||||||
{
|
{
|
||||||
[PgName("user_profile_ffvisibility_enum")]
|
[PgName("user_profile_ffvisibility_enum")]
|
||||||
|
|
|
@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Core.Database.Tables;
|
namespace Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
|
||||||
[Table("user_publickey")]
|
[Table("user_publickey")]
|
||||||
[Index("KeyId", IsUnique = true)]
|
[Index(nameof(KeyId), IsUnique = true)]
|
||||||
public class UserPublickey
|
public class UserPublickey
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
|
|
Loading…
Add table
Reference in a new issue