diff --git a/packages/backend/src/models/RepositoryModule.ts b/packages/backend/src/models/RepositoryModule.ts index 1f8cb2a2a3..1e777b7bf1 100644 --- a/packages/backend/src/models/RepositoryModule.ts +++ b/packages/backend/src/models/RepositoryModule.ts @@ -5,7 +5,7 @@ import { Module } from '@nestjs/common'; import { DI } from '@/di-symbols.js'; -import { User, Note, Announcement, AnnouncementRead, App, NoteFavorite, NoteThreadMuting, NoteReaction, NoteUnread, Poll, PollVote, UserProfile, UserKeypair, UserPending, AttestationChallenge, UserSecurityKey, UserPublickey, UserList, UserListJoining, UserNotePining, UserIp, UsedUsername, Following, FollowRequest, Instance, Emoji, DriveFile, DriveFolder, Meta, Muting, RenoteMuting, Blocking, SwSubscription, Hashtag, AbuseUserReport, RegistrationTicket, AuthSession, AccessToken, Signin, Page, PageLike, GalleryPost, GalleryLike, ModerationLog, Clip, ClipNote, Antenna, PromoNote, PromoRead, Relay, MutedNote, Channel, ChannelFollowing, ChannelFavorite, RegistryItem, Webhook, Ad, PasswordResetRequest, RetentionAggregation, FlashLike, Flash, Role, RoleAssignment, ClipFavorite, UserMemo, UserListFavorite } from './index.js'; +import { User, Note, Announcement, AnnouncementRead, App, NoteFavorite, NoteThreadMuting, NoteReaction, NoteUnread, Poll, PollVote, UserProfile, UserKeypair, UserPending, AttestationChallenge, UserSecurityKey, UserPublickey, UserList, UserListJoining, UserNotePining, UserIp, UsedUsername, Following, FollowRequest, Instance, Emoji, DriveFile, DriveFolder, Meta, Muting, RenoteMuting, Blocking, SwSubscription, Hashtag, MiAbuseUserReport, RegistrationTicket, AuthSession, AccessToken, Signin, Page, PageLike, GalleryPost, GalleryLike, ModerationLog, Clip, ClipNote, Antenna, PromoNote, PromoRead, Relay, MutedNote, Channel, ChannelFollowing, ChannelFavorite, RegistryItem, Webhook, Ad, PasswordResetRequest, RetentionAggregation, FlashLike, Flash, Role, RoleAssignment, ClipFavorite, UserMemo, UserListFavorite } from './index.js'; import type { DataSource } from 'typeorm'; import type { Provider } from '@nestjs/common'; @@ -221,7 +221,7 @@ const $hashtagsRepository: Provider = { const $abuseUserReportsRepository: Provider = { provide: DI.abuseUserReportsRepository, - useFactory: (db: DataSource) => db.getRepository(AbuseUserReport), + useFactory: (db: DataSource) => db.getRepository(MiAbuseUserReport), inject: [DI.db], }; diff --git a/packages/backend/src/models/index.ts b/packages/backend/src/models/index.ts index 9f8ffe3600..d14234b792 100644 --- a/packages/backend/src/models/index.ts +++ b/packages/backend/src/models/index.ts @@ -72,72 +72,72 @@ import { MiUserListFavorite } from './entities/UserListFavorite.js'; import type { Repository } from 'typeorm'; export { - MiAbuseUserReport as AbuseUserReport, - MiAccessToken as AccessToken, - MiAd as Ad, - MiAnnouncement as Announcement, - MiAnnouncementRead as AnnouncementRead, - MiAntenna as Antenna, - MiApp as App, - MiAttestationChallenge as AttestationChallenge, - MiAuthSession as AuthSession, - MiBlocking as Blocking, - MiChannelFollowing as ChannelFollowing, - MiChannelFavorite as ChannelFavorite, - MiClip as Clip, - MiClipNote as ClipNote, - MiClipFavorite as ClipFavorite, - MiDriveFile as DriveFile, - MiDriveFolder as DriveFolder, - MiEmoji as Emoji, - MiFollowing as Following, - MiFollowRequest as FollowRequest, - MiGalleryLike as GalleryLike, - MiGalleryPost as GalleryPost, - MiHashtag as Hashtag, - MiInstance as Instance, - MiMeta as Meta, - MiModerationLog as ModerationLog, - MiMutedNote as MutedNote, - MiMuting as Muting, - MiRenoteMuting as RenoteMuting, - MiNote as Note, - MiNoteFavorite as NoteFavorite, - MiNoteReaction as NoteReaction, - MiNoteThreadMuting as NoteThreadMuting, - MiNoteUnread as NoteUnread, - MiPage as Page, - MiPageLike as PageLike, - MiPasswordResetRequest as PasswordResetRequest, - MiPoll as Poll, - MiPollVote as PollVote, - MiPromoNote as PromoNote, - MiPromoRead as PromoRead, - MiRegistrationTicket as RegistrationTicket, - MiRegistryItem as RegistryItem, - MiRelay as Relay, - MiSignin as Signin, - MiSwSubscription as SwSubscription, - MiUsedUsername as UsedUsername, - MiUser as User, - MiUserIp as UserIp, - MiUserKeypair as UserKeypair, - MiUserList as UserList, - MiUserListFavorite as UserListFavorite, - MiUserListJoining as UserListJoining, - MiUserNotePining as UserNotePining, - MiUserPending as UserPending, - MiUserProfile as UserProfile, - MiUserPublickey as UserPublickey, - MiUserSecurityKey as UserSecurityKey, - MiWebhook as Webhook, - MiChannel as Channel, - MiRetentionAggregation as RetentionAggregation, - MiRole as Role, - MiRoleAssignment as RoleAssignment, - MiFlash as Flash, - MiFlashLike as FlashLike, - MiUserMemo as UserMemo, + MiAbuseUserReport, + MiAccessToken, + MiAd, + MiAnnouncement, + MiAnnouncementRead, + MiAntenna, + MiApp, + MiAttestationChallenge, + MiAuthSession, + MiBlocking, + MiChannelFollowing, + MiChannelFavorite, + MiClip, + MiClipNote, + MiClipFavorite, + MiDriveFile, + MiDriveFolder, + MiEmoji, + MiFollowing, + MiFollowRequest, + MiGalleryLike, + MiGalleryPost, + MiHashtag, + MiInstance, + MiMeta, + MiModerationLog, + MiMutedNote, + MiMuting, + MiRenoteMuting, + MiNote, + MiNoteFavorite, + MiNoteReaction, + MiNoteThreadMuting, + MiNoteUnread, + MiPage, + MiPageLike, + MiPasswordResetRequest, + MiPoll, + MiPollVote, + MiPromoNote, + MiPromoRead, + MiRegistrationTicket, + MiRegistryItem, + MiRelay, + MiSignin, + MiSwSubscription, + MiUsedUsername, + MiUser, + MiUserIp, + MiUserKeypair, + MiUserList, + MiUserListFavorite, + MiUserListJoining, + MiUserNotePining, + MiUserPending, + MiUserProfile, + MiUserPublickey, + MiUserSecurityKey, + MiWebhook, + MiChannel, + MiRetentionAggregation, + MiRole, + MiRoleAssignment, + MiFlash, + MiFlashLike, + MiUserMemo, }; export type AbuseUserReportsRepository = Repository; diff --git a/packages/backend/test/e2e/endpoints.ts b/packages/backend/test/e2e/endpoints.ts index 55fbf9ad47..6e91786413 100644 --- a/packages/backend/test/e2e/endpoints.ts +++ b/packages/backend/test/e2e/endpoints.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; // node-fetch only supports it's own Blob yet // https://github.com/node-fetch/node-fetch/pull/1664 import { Blob } from 'node-fetch'; -import { User } from '@/models/index.js'; +import { MiUser } from '@/models/index.js'; import { startServer, signup, post, api, uploadFile, simpleGet, initTestDb } from '../utils.js'; import type { INestApplicationContext } from '@nestjs/common'; import type * as misskey from 'misskey-js'; @@ -298,7 +298,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 200); const connection = await initTestDb(true); - const Users = connection.getRepository(User); + const Users = connection.getRepository(MiUser); const newBob = await Users.findOneByOrFail({ id: bob.id }); assert.strictEqual(newBob.followersCount, 0); assert.strictEqual(newBob.followingCount, 1); @@ -360,7 +360,7 @@ describe('Endpoints', () => { assert.strictEqual(res.status, 200); const connection = await initTestDb(true); - const Users = connection.getRepository(User); + const Users = connection.getRepository(MiUser); const newBob = await Users.findOneByOrFail({ id: bob.id }); assert.strictEqual(newBob.followersCount, 0); assert.strictEqual(newBob.followingCount, 0); diff --git a/packages/backend/test/e2e/move.ts b/packages/backend/test/e2e/move.ts index faee6087da..24c9473ae8 100644 --- a/packages/backend/test/e2e/move.ts +++ b/packages/backend/test/e2e/move.ts @@ -7,7 +7,7 @@ process.env.NODE_ENV = 'test'; import * as assert from 'assert'; import { loadConfig } from '@/config.js'; -import { User, UsersRepository } from '@/models/index.js'; +import { MiUser, UsersRepository } from '@/models/index.js'; import { jobQueue } from '@/boot/common.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; import { uploadFile, signup, startServer, initTestDb, api, sleep, successfulApiCall } from '../utils.js'; @@ -42,7 +42,7 @@ describe('Account Move', () => { dave = await signup({ username: 'dave' }); eve = await signup({ username: 'eve' }); frank = await signup({ username: 'frank' }); - Users = connection.getRepository(User); + Users = connection.getRepository(MiUser); }, 1000 * 60 * 2); afterAll(async () => { diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts index 292abe5cff..20208c4571 100644 --- a/packages/backend/test/e2e/note.ts +++ b/packages/backend/test/e2e/note.ts @@ -6,7 +6,7 @@ process.env.NODE_ENV = 'test'; import * as assert from 'assert'; -import { Note } from '@/models/entities/Note.js'; +import { MiNote } from '@/models/entities/Note.js'; import { MAX_NOTE_TEXT_LENGTH } from '@/const.js'; import { signup, post, uploadUrl, startServer, initTestDb, api, uploadFile } from '../utils.js'; import type { INestApplicationContext } from '@nestjs/common'; @@ -22,7 +22,7 @@ describe('Note', () => { beforeAll(async () => { app = await startServer(); const connection = await initTestDb(true); - Notes = connection.getRepository(Note); + Notes = connection.getRepository(MiNote); alice = await signup({ username: 'alice' }); bob = await signup({ username: 'bob' }); }, 1000 * 60 * 2); diff --git a/packages/backend/test/e2e/streaming.ts b/packages/backend/test/e2e/streaming.ts index 046629979a..0dd97069a0 100644 --- a/packages/backend/test/e2e/streaming.ts +++ b/packages/backend/test/e2e/streaming.ts @@ -6,7 +6,7 @@ process.env.NODE_ENV = 'test'; import * as assert from 'assert'; -import { Following } from '@/models/entities/Following.js'; +import { MiFollowing } from '@/models/entities/Following.js'; import { connectStream, signup, api, post, startServer, initTestDb, waitFire } from '../utils.js'; import type { INestApplicationContext } from '@nestjs/common'; import type * as misskey from 'misskey-js'; @@ -46,7 +46,7 @@ describe('Streaming', () => { beforeAll(async () => { app = await startServer(); const connection = await initTestDb(true); - Followings = connection.getRepository(Following); + Followings = connection.getRepository(MiFollowing); ayano = await signup({ username: 'ayano' }); kyoko = await signup({ username: 'kyoko' });