From a231b36d59ea12bc54b030dec7ab0f7bb719c77b Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 13 Dec 2022 23:08:54 +0100 Subject: [PATCH] chore: fix lint about unused variables in entities --- .../backend/src/models/entities/abuse-user-report.ts | 6 +++--- packages/backend/src/models/entities/access-token.ts | 4 ++-- .../backend/src/models/entities/announcement-read.ts | 4 ++-- packages/backend/src/models/entities/antenna-note.ts | 4 ++-- packages/backend/src/models/entities/antenna.ts | 6 +++--- packages/backend/src/models/entities/app.ts | 2 +- .../src/models/entities/attestation-challenge.ts | 2 +- packages/backend/src/models/entities/blocking.ts | 4 ++-- .../backend/src/models/entities/channel-following.ts | 4 ++-- .../src/models/entities/channel-note-pining.ts | 4 ++-- packages/backend/src/models/entities/channel.ts | 4 ++-- packages/backend/src/models/entities/clip-note.ts | 4 ++-- packages/backend/src/models/entities/clip.ts | 2 +- packages/backend/src/models/entities/drive-file.ts | 4 ++-- packages/backend/src/models/entities/drive-folder.ts | 4 ++-- .../backend/src/models/entities/follow-request.ts | 4 ++-- packages/backend/src/models/entities/following.ts | 4 ++-- packages/backend/src/models/entities/gallery-like.ts | 4 ++-- packages/backend/src/models/entities/gallery-post.ts | 2 +- .../backend/src/models/entities/messaging-message.ts | 8 ++++---- packages/backend/src/models/entities/meta.ts | 2 +- .../backend/src/models/entities/moderation-log.ts | 2 +- packages/backend/src/models/entities/muted-note.ts | 4 ++-- packages/backend/src/models/entities/muting.ts | 4 ++-- .../backend/src/models/entities/note-favorite.ts | 4 ++-- .../backend/src/models/entities/note-reaction.ts | 4 ++-- .../src/models/entities/note-thread-muting.ts | 2 +- packages/backend/src/models/entities/note-unread.ts | 4 ++-- .../backend/src/models/entities/note-watching.ts | 4 ++-- packages/backend/src/models/entities/note.ts | 8 ++++---- packages/backend/src/models/entities/notification.ts | 12 ++++++------ packages/backend/src/models/entities/page-like.ts | 4 ++-- packages/backend/src/models/entities/page.ts | 4 ++-- .../src/models/entities/password-reset-request.ts | 2 +- packages/backend/src/models/entities/poll-vote.ts | 4 ++-- packages/backend/src/models/entities/poll.ts | 2 +- .../backend/src/models/entities/registry-item.ts | 2 +- .../backend/src/models/entities/renote-muting.ts | 4 ++-- packages/backend/src/models/entities/signin.ts | 2 +- .../backend/src/models/entities/sw-subscription.ts | 2 +- .../src/models/entities/user-group-invitation.ts | 4 ++-- .../src/models/entities/user-group-joining.ts | 4 ++-- packages/backend/src/models/entities/user-group.ts | 2 +- packages/backend/src/models/entities/user-keypair.ts | 2 +- .../backend/src/models/entities/user-list-joining.ts | 4 ++-- packages/backend/src/models/entities/user-list.ts | 2 +- .../backend/src/models/entities/user-note-pining.ts | 4 ++-- packages/backend/src/models/entities/user-profile.ts | 4 ++-- .../backend/src/models/entities/user-publickey.ts | 2 +- .../backend/src/models/entities/user-security-key.ts | 2 +- packages/backend/src/models/entities/user.ts | 4 ++-- packages/backend/src/models/entities/webhook.ts | 2 +- 52 files changed, 96 insertions(+), 96 deletions(-) diff --git a/packages/backend/src/models/entities/abuse-user-report.ts b/packages/backend/src/models/entities/abuse-user-report.ts index 9e5c4f793..dc7f27377 100644 --- a/packages/backend/src/models/entities/abuse-user-report.ts +++ b/packages/backend/src/models/entities/abuse-user-report.ts @@ -17,7 +17,7 @@ export class AbuseUserReport { @Column(id()) public targetUserId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -27,7 +27,7 @@ export class AbuseUserReport { @Column(id()) public reporterId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -39,7 +39,7 @@ export class AbuseUserReport { }) public assigneeId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/access-token.ts b/packages/backend/src/models/entities/access-token.ts index 59e6b8857..b6dc8cebc 100644 --- a/packages/backend/src/models/entities/access-token.ts +++ b/packages/backend/src/models/entities/access-token.ts @@ -41,7 +41,7 @@ export class AccessToken { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -53,7 +53,7 @@ export class AccessToken { }) public appId: App['id'] | null; - @ManyToOne(type => App, { + @ManyToOne(() => App, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/announcement-read.ts b/packages/backend/src/models/entities/announcement-read.ts index 6e21dc1b4..0102a2fa2 100644 --- a/packages/backend/src/models/entities/announcement-read.ts +++ b/packages/backend/src/models/entities/announcement-read.ts @@ -18,7 +18,7 @@ export class AnnouncementRead { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -28,7 +28,7 @@ export class AnnouncementRead { @Column(id()) public announcementId: Announcement['id']; - @ManyToOne(type => Announcement, { + @ManyToOne(() => Announcement, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/antenna-note.ts b/packages/backend/src/models/entities/antenna-note.ts index 46f600d4e..1ff1c75fe 100644 --- a/packages/backend/src/models/entities/antenna-note.ts +++ b/packages/backend/src/models/entities/antenna-note.ts @@ -16,7 +16,7 @@ export class AntennaNote { }) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() @@ -29,7 +29,7 @@ export class AntennaNote { }) public antennaId: Antenna['id']; - @ManyToOne(type => Antenna, { + @ManyToOne(() => Antenna, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/antenna.ts b/packages/backend/src/models/entities/antenna.ts index b500d597d..8fe47f1e4 100644 --- a/packages/backend/src/models/entities/antenna.ts +++ b/packages/backend/src/models/entities/antenna.ts @@ -21,7 +21,7 @@ export class Antenna { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -42,7 +42,7 @@ export class Antenna { }) public userListId: UserList['id'] | null; - @ManyToOne(type => UserList, { + @ManyToOne(() => UserList, { onDelete: 'CASCADE', }) @JoinColumn() @@ -54,7 +54,7 @@ export class Antenna { }) public userGroupJoiningId: UserGroupJoining['id'] | null; - @ManyToOne(type => UserGroupJoining, { + @ManyToOne(() => UserGroupJoining, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/app.ts b/packages/backend/src/models/entities/app.ts index 567f840bb..dcca3be4c 100644 --- a/packages/backend/src/models/entities/app.ts +++ b/packages/backend/src/models/entities/app.ts @@ -21,7 +21,7 @@ export class App { }) public userId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'SET NULL', nullable: true, }) diff --git a/packages/backend/src/models/entities/attestation-challenge.ts b/packages/backend/src/models/entities/attestation-challenge.ts index a5725342e..2a99953ee 100644 --- a/packages/backend/src/models/entities/attestation-challenge.ts +++ b/packages/backend/src/models/entities/attestation-challenge.ts @@ -11,7 +11,7 @@ export class AttestationChallenge { @PrimaryColumn(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/blocking.ts b/packages/backend/src/models/entities/blocking.ts index c13962567..ad45a0569 100644 --- a/packages/backend/src/models/entities/blocking.ts +++ b/packages/backend/src/models/entities/blocking.ts @@ -21,7 +21,7 @@ export class Blocking { }) public blockeeId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -34,7 +34,7 @@ export class Blocking { }) public blockerId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/channel-following.ts b/packages/backend/src/models/entities/channel-following.ts index f914fe592..5a717c9e8 100644 --- a/packages/backend/src/models/entities/channel-following.ts +++ b/packages/backend/src/models/entities/channel-following.ts @@ -22,7 +22,7 @@ export class ChannelFollowing { }) public followeeId: Channel['id']; - @ManyToOne(type => Channel, { + @ManyToOne(() => Channel, { onDelete: 'CASCADE', }) @JoinColumn() @@ -35,7 +35,7 @@ export class ChannelFollowing { }) public followerId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/channel-note-pining.ts b/packages/backend/src/models/entities/channel-note-pining.ts index 28f2e51dc..0be4f0dba 100644 --- a/packages/backend/src/models/entities/channel-note-pining.ts +++ b/packages/backend/src/models/entities/channel-note-pining.ts @@ -18,7 +18,7 @@ export class ChannelNotePining { @Column(id()) public channelId: Channel['id']; - @ManyToOne(type => Channel, { + @ManyToOne(() => Channel, { onDelete: 'CASCADE', }) @JoinColumn() @@ -27,7 +27,7 @@ export class ChannelNotePining { @Column(id()) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/channel.ts b/packages/backend/src/models/entities/channel.ts index 82f7cd6b9..44219c37d 100644 --- a/packages/backend/src/models/entities/channel.ts +++ b/packages/backend/src/models/entities/channel.ts @@ -28,7 +28,7 @@ export class Channel { }) public userId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'SET NULL', }) @JoinColumn() @@ -53,7 +53,7 @@ export class Channel { }) public bannerId: DriveFile['id'] | null; - @ManyToOne(type => DriveFile, { + @ManyToOne(() => DriveFile, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/clip-note.ts b/packages/backend/src/models/entities/clip-note.ts index 59d589461..89c5f03d1 100644 --- a/packages/backend/src/models/entities/clip-note.ts +++ b/packages/backend/src/models/entities/clip-note.ts @@ -16,7 +16,7 @@ export class ClipNote { }) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() @@ -29,7 +29,7 @@ export class ClipNote { }) public clipId: Clip['id']; - @ManyToOne(type => Clip, { + @ManyToOne(() => Clip, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/clip.ts b/packages/backend/src/models/entities/clip.ts index b4b7568c8..0580db129 100644 --- a/packages/backend/src/models/entities/clip.ts +++ b/packages/backend/src/models/entities/clip.ts @@ -19,7 +19,7 @@ export class Clip { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/drive-file.ts b/packages/backend/src/models/entities/drive-file.ts index 95647c1ae..61f6cb2ec 100644 --- a/packages/backend/src/models/entities/drive-file.ts +++ b/packages/backend/src/models/entities/drive-file.ts @@ -23,7 +23,7 @@ export class DriveFile { }) public userId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'RESTRICT', }) @JoinColumn() @@ -144,7 +144,7 @@ export class DriveFile { }) public folderId: DriveFolder['id'] | null; - @ManyToOne(type => DriveFolder, { + @ManyToOne(() => DriveFolder, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/drive-folder.ts b/packages/backend/src/models/entities/drive-folder.ts index 2d952cae9..d7e323e72 100644 --- a/packages/backend/src/models/entities/drive-folder.ts +++ b/packages/backend/src/models/entities/drive-folder.ts @@ -27,7 +27,7 @@ export class DriveFolder { }) public userId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -41,7 +41,7 @@ export class DriveFolder { }) public parentId: DriveFolder['id'] | null; - @ManyToOne(type => DriveFolder, { + @ManyToOne(() => DriveFolder, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/follow-request.ts b/packages/backend/src/models/entities/follow-request.ts index cd0acc453..93d685c55 100644 --- a/packages/backend/src/models/entities/follow-request.ts +++ b/packages/backend/src/models/entities/follow-request.ts @@ -20,7 +20,7 @@ export class FollowRequest { }) public followeeId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -33,7 +33,7 @@ export class FollowRequest { }) public followerId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/following.ts b/packages/backend/src/models/entities/following.ts index 55b9dc84f..c430cd388 100644 --- a/packages/backend/src/models/entities/following.ts +++ b/packages/backend/src/models/entities/following.ts @@ -21,7 +21,7 @@ export class Following { }) public followeeId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -34,7 +34,7 @@ export class Following { }) public followerId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/gallery-like.ts b/packages/backend/src/models/entities/gallery-like.ts index a8ff57899..259981392 100644 --- a/packages/backend/src/models/entities/gallery-like.ts +++ b/packages/backend/src/models/entities/gallery-like.ts @@ -16,7 +16,7 @@ export class GalleryLike { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -25,7 +25,7 @@ export class GalleryLike { @Column(id()) public postId: GalleryPost['id']; - @ManyToOne(type => GalleryPost, { + @ManyToOne(() => GalleryPost, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/gallery-post.ts b/packages/backend/src/models/entities/gallery-post.ts index 6ed392d86..315bcd371 100644 --- a/packages/backend/src/models/entities/gallery-post.ts +++ b/packages/backend/src/models/entities/gallery-post.ts @@ -37,7 +37,7 @@ export class GalleryPost { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/messaging-message.ts b/packages/backend/src/models/entities/messaging-message.ts index 4ac387813..95862aab4 100644 --- a/packages/backend/src/models/entities/messaging-message.ts +++ b/packages/backend/src/models/entities/messaging-message.ts @@ -22,7 +22,7 @@ export class MessagingMessage { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -35,7 +35,7 @@ export class MessagingMessage { }) public recipientId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -48,7 +48,7 @@ export class MessagingMessage { }) public groupId: UserGroup['id'] | null; - @ManyToOne(type => UserGroup, { + @ManyToOne(() => UserGroup, { onDelete: 'CASCADE', }) @JoinColumn() @@ -81,7 +81,7 @@ export class MessagingMessage { }) public fileId: DriveFile['id'] | null; - @ManyToOne(type => DriveFile, { + @ManyToOne(() => DriveFile, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/meta.ts b/packages/backend/src/models/entities/meta.ts index d30bfd67e..9c438bcd6 100644 --- a/packages/backend/src/models/entities/meta.ts +++ b/packages/backend/src/models/entities/meta.ts @@ -134,7 +134,7 @@ export class Meta { }) public proxyAccountId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/moderation-log.ts b/packages/backend/src/models/entities/moderation-log.ts index 47b0bc715..ad97db27f 100644 --- a/packages/backend/src/models/entities/moderation-log.ts +++ b/packages/backend/src/models/entities/moderation-log.ts @@ -16,7 +16,7 @@ export class ModerationLog { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/muted-note.ts b/packages/backend/src/models/entities/muted-note.ts index 649b26879..3c034bec2 100644 --- a/packages/backend/src/models/entities/muted-note.ts +++ b/packages/backend/src/models/entities/muted-note.ts @@ -17,7 +17,7 @@ export class MutedNote { }) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() @@ -30,7 +30,7 @@ export class MutedNote { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/muting.ts b/packages/backend/src/models/entities/muting.ts index 19ff0da84..02b37a78d 100644 --- a/packages/backend/src/models/entities/muting.ts +++ b/packages/backend/src/models/entities/muting.ts @@ -27,7 +27,7 @@ export class Muting { }) public muteeId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -40,7 +40,7 @@ export class Muting { }) public muterId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/note-favorite.ts b/packages/backend/src/models/entities/note-favorite.ts index 63fb54bbe..8b4449c3e 100644 --- a/packages/backend/src/models/entities/note-favorite.ts +++ b/packages/backend/src/models/entities/note-favorite.ts @@ -18,7 +18,7 @@ export class NoteFavorite { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -27,7 +27,7 @@ export class NoteFavorite { @Column(id()) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/note-reaction.ts b/packages/backend/src/models/entities/note-reaction.ts index d84e64304..d86421671 100644 --- a/packages/backend/src/models/entities/note-reaction.ts +++ b/packages/backend/src/models/entities/note-reaction.ts @@ -19,7 +19,7 @@ export class NoteReaction { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -29,7 +29,7 @@ export class NoteReaction { @Column(id()) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/note-thread-muting.ts b/packages/backend/src/models/entities/note-thread-muting.ts index 325bcfc1b..90ed0c9f8 100644 --- a/packages/backend/src/models/entities/note-thread-muting.ts +++ b/packages/backend/src/models/entities/note-thread-muting.ts @@ -20,7 +20,7 @@ export class NoteThreadMuting { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/note-unread.ts b/packages/backend/src/models/entities/note-unread.ts index 3219970f3..dbcc7e2d8 100644 --- a/packages/backend/src/models/entities/note-unread.ts +++ b/packages/backend/src/models/entities/note-unread.ts @@ -14,7 +14,7 @@ export class NoteUnread { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -24,7 +24,7 @@ export class NoteUnread { @Column(id()) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/note-watching.ts b/packages/backend/src/models/entities/note-watching.ts index d51d14693..7e9dfdb98 100644 --- a/packages/backend/src/models/entities/note-watching.ts +++ b/packages/backend/src/models/entities/note-watching.ts @@ -22,7 +22,7 @@ export class NoteWatching { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -35,7 +35,7 @@ export class NoteWatching { }) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/note.ts b/packages/backend/src/models/entities/note.ts index 0e15921b7..1e5f418c5 100644 --- a/packages/backend/src/models/entities/note.ts +++ b/packages/backend/src/models/entities/note.ts @@ -27,7 +27,7 @@ export class Note { }) public replyId: Note['id'] | null; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() @@ -41,7 +41,7 @@ export class Note { }) public renoteId: Note['id'] | null; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() @@ -75,7 +75,7 @@ export class Note { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -179,7 +179,7 @@ export class Note { }) public channelId: Channel['id'] | null; - @ManyToOne(type => Channel, { + @ManyToOne(() => Channel, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/notification.ts b/packages/backend/src/models/entities/notification.ts index a757548bd..cab6551f7 100644 --- a/packages/backend/src/models/entities/notification.ts +++ b/packages/backend/src/models/entities/notification.ts @@ -28,7 +28,7 @@ export class Notification { }) public notifieeId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -45,7 +45,7 @@ export class Notification { }) public notifierId: User['id'] | null; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -89,7 +89,7 @@ export class Notification { }) public noteId: Note['id'] | null; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() @@ -101,7 +101,7 @@ export class Notification { }) public followRequestId: FollowRequest['id'] | null; - @ManyToOne(type => FollowRequest, { + @ManyToOne(() => FollowRequest, { onDelete: 'CASCADE', }) @JoinColumn() @@ -113,7 +113,7 @@ export class Notification { }) public userGroupInvitationId: UserGroupInvitation['id'] | null; - @ManyToOne(type => UserGroupInvitation, { + @ManyToOne(() => UserGroupInvitation, { onDelete: 'CASCADE', }) @JoinColumn() @@ -165,7 +165,7 @@ export class Notification { }) public appAccessTokenId: AccessToken['id'] | null; - @ManyToOne(type => AccessToken, { + @ManyToOne(() => AccessToken, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/page-like.ts b/packages/backend/src/models/entities/page-like.ts index 6c8e03f7e..149def459 100644 --- a/packages/backend/src/models/entities/page-like.ts +++ b/packages/backend/src/models/entities/page-like.ts @@ -16,7 +16,7 @@ export class PageLike { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -25,7 +25,7 @@ export class PageLike { @Column(id()) public pageId: Page['id']; - @ManyToOne(type => Page, { + @ManyToOne(() => Page, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/page.ts b/packages/backend/src/models/entities/page.ts index 67da0c13a..b25e064e2 100644 --- a/packages/backend/src/models/entities/page.ts +++ b/packages/backend/src/models/entities/page.ts @@ -57,7 +57,7 @@ export class Page { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -69,7 +69,7 @@ export class Page { }) public eyeCatchingImageId: DriveFile['id'] | null; - @ManyToOne(type => DriveFile, { + @ManyToOne(() => DriveFile, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/password-reset-request.ts b/packages/backend/src/models/entities/password-reset-request.ts index 05e62cc5a..4edd3d2a8 100644 --- a/packages/backend/src/models/entities/password-reset-request.ts +++ b/packages/backend/src/models/entities/password-reset-request.ts @@ -22,7 +22,7 @@ export class PasswordResetRequest { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/poll-vote.ts b/packages/backend/src/models/entities/poll-vote.ts index 442c58d35..9824f5017 100644 --- a/packages/backend/src/models/entities/poll-vote.ts +++ b/packages/backend/src/models/entities/poll-vote.ts @@ -19,7 +19,7 @@ export class PollVote { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -29,7 +29,7 @@ export class PollVote { @Column(id()) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/poll.ts b/packages/backend/src/models/entities/poll.ts index ece6c8a3b..2e90a24d8 100644 --- a/packages/backend/src/models/entities/poll.ts +++ b/packages/backend/src/models/entities/poll.ts @@ -9,7 +9,7 @@ export class Poll { @PrimaryColumn(id()) public noteId: Note['id']; - @OneToOne(type => Note, { + @OneToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/registry-item.ts b/packages/backend/src/models/entities/registry-item.ts index 7f8c5d6a2..bbafae4a3 100644 --- a/packages/backend/src/models/entities/registry-item.ts +++ b/packages/backend/src/models/entities/registry-item.ts @@ -25,7 +25,7 @@ export class RegistryItem { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/renote-muting.ts b/packages/backend/src/models/entities/renote-muting.ts index 8e4adbfcd..ee9bbb49b 100644 --- a/packages/backend/src/models/entities/renote-muting.ts +++ b/packages/backend/src/models/entities/renote-muting.ts @@ -21,7 +21,7 @@ export class RenoteMuting { }) public muteeId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -34,7 +34,7 @@ export class RenoteMuting { }) public muterId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/signin.ts b/packages/backend/src/models/entities/signin.ts index d50c052e9..19587eee4 100644 --- a/packages/backend/src/models/entities/signin.ts +++ b/packages/backend/src/models/entities/signin.ts @@ -16,7 +16,7 @@ export class Signin { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/sw-subscription.ts b/packages/backend/src/models/entities/sw-subscription.ts index 801a5fd81..2e723b76d 100644 --- a/packages/backend/src/models/entities/sw-subscription.ts +++ b/packages/backend/src/models/entities/sw-subscription.ts @@ -14,7 +14,7 @@ export class SwSubscription { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-group-invitation.ts b/packages/backend/src/models/entities/user-group-invitation.ts index d51ec6324..52899f348 100644 --- a/packages/backend/src/models/entities/user-group-invitation.ts +++ b/packages/backend/src/models/entities/user-group-invitation.ts @@ -21,7 +21,7 @@ export class UserGroupInvitation { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -34,7 +34,7 @@ export class UserGroupInvitation { }) public userGroupId: UserGroup['id']; - @ManyToOne(type => UserGroup, { + @ManyToOne(() => UserGroup, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-group-joining.ts b/packages/backend/src/models/entities/user-group-joining.ts index fbce5f6e7..836db73dd 100644 --- a/packages/backend/src/models/entities/user-group-joining.ts +++ b/packages/backend/src/models/entities/user-group-joining.ts @@ -21,7 +21,7 @@ export class UserGroupJoining { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -34,7 +34,7 @@ export class UserGroupJoining { }) public userGroupId: UserGroup['id']; - @ManyToOne(type => UserGroup, { + @ManyToOne(() => UserGroup, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-group.ts b/packages/backend/src/models/entities/user-group.ts index 1538153bf..7a488a625 100644 --- a/packages/backend/src/models/entities/user-group.ts +++ b/packages/backend/src/models/entities/user-group.ts @@ -25,7 +25,7 @@ export class UserGroup { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-keypair.ts b/packages/backend/src/models/entities/user-keypair.ts index 7db39f6df..596cb64a3 100644 --- a/packages/backend/src/models/entities/user-keypair.ts +++ b/packages/backend/src/models/entities/user-keypair.ts @@ -7,7 +7,7 @@ export class UserKeypair { @PrimaryColumn(id()) public userId: User['id']; - @OneToOne(type => User, { + @OneToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-list-joining.ts b/packages/backend/src/models/entities/user-list-joining.ts index f66151ff9..466113d58 100644 --- a/packages/backend/src/models/entities/user-list-joining.ts +++ b/packages/backend/src/models/entities/user-list-joining.ts @@ -21,7 +21,7 @@ export class UserListJoining { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -34,7 +34,7 @@ export class UserListJoining { }) public userListId: UserList['id']; - @ManyToOne(type => UserList, { + @ManyToOne(() => UserList, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-list.ts b/packages/backend/src/models/entities/user-list.ts index 4e895b1d1..922565c59 100644 --- a/packages/backend/src/models/entities/user-list.ts +++ b/packages/backend/src/models/entities/user-list.ts @@ -19,7 +19,7 @@ export class UserList { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-note-pining.ts b/packages/backend/src/models/entities/user-note-pining.ts index c4ba30bef..2f0eadd04 100644 --- a/packages/backend/src/models/entities/user-note-pining.ts +++ b/packages/backend/src/models/entities/user-note-pining.ts @@ -18,7 +18,7 @@ export class UserNotePining { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -27,7 +27,7 @@ export class UserNotePining { @Column(id()) public noteId: Note['id']; - @ManyToOne(type => Note, { + @ManyToOne(() => Note, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-profile.ts b/packages/backend/src/models/entities/user-profile.ts index 93358e17a..efa525f35 100644 --- a/packages/backend/src/models/entities/user-profile.ts +++ b/packages/backend/src/models/entities/user-profile.ts @@ -11,7 +11,7 @@ export class UserProfile { @PrimaryColumn(id()) public userId: User['id']; - @OneToOne(type => User, { + @OneToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() @@ -161,7 +161,7 @@ export class UserProfile { }) public pinnedPageId: Page['id'] | null; - @OneToOne(type => Page, { + @OneToOne(() => Page, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-publickey.ts b/packages/backend/src/models/entities/user-publickey.ts index c0a439227..ab686567d 100644 --- a/packages/backend/src/models/entities/user-publickey.ts +++ b/packages/backend/src/models/entities/user-publickey.ts @@ -7,7 +7,7 @@ export class UserPublickey { @PrimaryColumn(id()) public userId: User['id']; - @OneToOne(type => User, { + @OneToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user-security-key.ts b/packages/backend/src/models/entities/user-security-key.ts index 78f78a501..1f472f7e9 100644 --- a/packages/backend/src/models/entities/user-security-key.ts +++ b/packages/backend/src/models/entities/user-security-key.ts @@ -13,7 +13,7 @@ export class UserSecurityKey { @Column(id()) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/user.ts b/packages/backend/src/models/entities/user.ts index ae905c580..449debcfc 100644 --- a/packages/backend/src/models/entities/user.ts +++ b/packages/backend/src/models/entities/user.ts @@ -81,7 +81,7 @@ export class User { }) public avatarId: DriveFile['id'] | null; - @OneToOne(type => DriveFile, { + @OneToOne(() => DriveFile, { onDelete: 'SET NULL', }) @JoinColumn() @@ -94,7 +94,7 @@ export class User { }) public bannerId: DriveFile['id'] | null; - @OneToOne(type => DriveFile, { + @OneToOne(() => DriveFile, { onDelete: 'SET NULL', }) @JoinColumn() diff --git a/packages/backend/src/models/entities/webhook.ts b/packages/backend/src/models/entities/webhook.ts index f89fe06c0..fe559af1c 100644 --- a/packages/backend/src/models/entities/webhook.ts +++ b/packages/backend/src/models/entities/webhook.ts @@ -21,7 +21,7 @@ export class Webhook { }) public userId: User['id']; - @ManyToOne(type => User, { + @ManyToOne(() => User, { onDelete: 'CASCADE', }) @JoinColumn()