Update RepositoryModule.ts

This commit is contained in:
syuilo 2023-08-15 20:30:31 +09:00
parent 325acaeef7
commit c5dc1c698d
1 changed files with 66 additions and 66 deletions

View File

@ -5,217 +5,217 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { DI } from '@/di-symbols.js'; 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, 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 { MiAbuseUserReport, MiAccessToken, MiAd, MiAnnouncement, MiAnnouncementRead, MiAntenna, MiApp, MiAttestationChallenge, MiAuthSession, MiBlocking, MiChannel, MiChannelFavorite, MiChannelFollowing, MiClip, MiClipFavorite, MiClipNote, MiDriveFile, MiDriveFolder, MiEmoji, MiFlash, MiFlashLike, MiFollowRequest, MiFollowing, MiGalleryLike, MiGalleryPost, MiHashtag, MiInstance, MiMeta, MiModerationLog, MiMutedNote, MiMuting, MiNote, MiNoteFavorite, MiNoteReaction, MiNoteThreadMuting, MiNoteUnread, MiPage, MiPageLike, MiPasswordResetRequest, MiPoll, MiPollVote, MiPromoNote, MiPromoRead, MiRegistrationTicket, MiRegistryItem, MiRelay, MiRenoteMuting, MiRetentionAggregation, MiRole, MiRoleAssignment, MiSignin, MiSwSubscription, MiUsedUsername, MiUser, MiUserIp, MiUserKeypair, MiUserList, MiUserListFavorite, MiUserListJoining, MiUserMemo, MiUserNotePining, MiUserPending, MiUserProfile, MiUserPublickey, MiUserSecurityKey, MiWebhook } from './index.js';
import type { DataSource } from 'typeorm'; import type { DataSource } from 'typeorm';
import type { Provider } from '@nestjs/common'; import type { Provider } from '@nestjs/common';
const $usersRepository: Provider = { const $usersRepository: Provider = {
provide: DI.usersRepository, provide: DI.usersRepository,
useFactory: (db: DataSource) => db.getRepository(User), useFactory: (db: DataSource) => db.getRepository(MiUser),
inject: [DI.db], inject: [DI.db],
}; };
const $notesRepository: Provider = { const $notesRepository: Provider = {
provide: DI.notesRepository, provide: DI.notesRepository,
useFactory: (db: DataSource) => db.getRepository(Note), useFactory: (db: DataSource) => db.getRepository(MiNote),
inject: [DI.db], inject: [DI.db],
}; };
const $announcementsRepository: Provider = { const $announcementsRepository: Provider = {
provide: DI.announcementsRepository, provide: DI.announcementsRepository,
useFactory: (db: DataSource) => db.getRepository(Announcement), useFactory: (db: DataSource) => db.getRepository(MiAnnouncement),
inject: [DI.db], inject: [DI.db],
}; };
const $announcementReadsRepository: Provider = { const $announcementReadsRepository: Provider = {
provide: DI.announcementReadsRepository, provide: DI.announcementReadsRepository,
useFactory: (db: DataSource) => db.getRepository(AnnouncementRead), useFactory: (db: DataSource) => db.getRepository(MiAnnouncementRead),
inject: [DI.db], inject: [DI.db],
}; };
const $appsRepository: Provider = { const $appsRepository: Provider = {
provide: DI.appsRepository, provide: DI.appsRepository,
useFactory: (db: DataSource) => db.getRepository(App), useFactory: (db: DataSource) => db.getRepository(MiApp),
inject: [DI.db], inject: [DI.db],
}; };
const $noteFavoritesRepository: Provider = { const $noteFavoritesRepository: Provider = {
provide: DI.noteFavoritesRepository, provide: DI.noteFavoritesRepository,
useFactory: (db: DataSource) => db.getRepository(NoteFavorite), useFactory: (db: DataSource) => db.getRepository(MiNoteFavorite),
inject: [DI.db], inject: [DI.db],
}; };
const $noteThreadMutingsRepository: Provider = { const $noteThreadMutingsRepository: Provider = {
provide: DI.noteThreadMutingsRepository, provide: DI.noteThreadMutingsRepository,
useFactory: (db: DataSource) => db.getRepository(NoteThreadMuting), useFactory: (db: DataSource) => db.getRepository(MiNoteThreadMuting),
inject: [DI.db], inject: [DI.db],
}; };
const $noteReactionsRepository: Provider = { const $noteReactionsRepository: Provider = {
provide: DI.noteReactionsRepository, provide: DI.noteReactionsRepository,
useFactory: (db: DataSource) => db.getRepository(NoteReaction), useFactory: (db: DataSource) => db.getRepository(MiNoteReaction),
inject: [DI.db], inject: [DI.db],
}; };
const $noteUnreadsRepository: Provider = { const $noteUnreadsRepository: Provider = {
provide: DI.noteUnreadsRepository, provide: DI.noteUnreadsRepository,
useFactory: (db: DataSource) => db.getRepository(NoteUnread), useFactory: (db: DataSource) => db.getRepository(MiNoteUnread),
inject: [DI.db], inject: [DI.db],
}; };
const $pollsRepository: Provider = { const $pollsRepository: Provider = {
provide: DI.pollsRepository, provide: DI.pollsRepository,
useFactory: (db: DataSource) => db.getRepository(Poll), useFactory: (db: DataSource) => db.getRepository(MiPoll),
inject: [DI.db], inject: [DI.db],
}; };
const $pollVotesRepository: Provider = { const $pollVotesRepository: Provider = {
provide: DI.pollVotesRepository, provide: DI.pollVotesRepository,
useFactory: (db: DataSource) => db.getRepository(PollVote), useFactory: (db: DataSource) => db.getRepository(MiPollVote),
inject: [DI.db], inject: [DI.db],
}; };
const $userProfilesRepository: Provider = { const $userProfilesRepository: Provider = {
provide: DI.userProfilesRepository, provide: DI.userProfilesRepository,
useFactory: (db: DataSource) => db.getRepository(UserProfile), useFactory: (db: DataSource) => db.getRepository(MiUserProfile),
inject: [DI.db], inject: [DI.db],
}; };
const $userKeypairsRepository: Provider = { const $userKeypairsRepository: Provider = {
provide: DI.userKeypairsRepository, provide: DI.userKeypairsRepository,
useFactory: (db: DataSource) => db.getRepository(UserKeypair), useFactory: (db: DataSource) => db.getRepository(MiUserKeypair),
inject: [DI.db], inject: [DI.db],
}; };
const $userPendingsRepository: Provider = { const $userPendingsRepository: Provider = {
provide: DI.userPendingsRepository, provide: DI.userPendingsRepository,
useFactory: (db: DataSource) => db.getRepository(UserPending), useFactory: (db: DataSource) => db.getRepository(MiUserPending),
inject: [DI.db], inject: [DI.db],
}; };
const $attestationChallengesRepository: Provider = { const $attestationChallengesRepository: Provider = {
provide: DI.attestationChallengesRepository, provide: DI.attestationChallengesRepository,
useFactory: (db: DataSource) => db.getRepository(AttestationChallenge), useFactory: (db: DataSource) => db.getRepository(MiAttestationChallenge),
inject: [DI.db], inject: [DI.db],
}; };
const $userSecurityKeysRepository: Provider = { const $userSecurityKeysRepository: Provider = {
provide: DI.userSecurityKeysRepository, provide: DI.userSecurityKeysRepository,
useFactory: (db: DataSource) => db.getRepository(UserSecurityKey), useFactory: (db: DataSource) => db.getRepository(MiUserSecurityKey),
inject: [DI.db], inject: [DI.db],
}; };
const $userPublickeysRepository: Provider = { const $userPublickeysRepository: Provider = {
provide: DI.userPublickeysRepository, provide: DI.userPublickeysRepository,
useFactory: (db: DataSource) => db.getRepository(UserPublickey), useFactory: (db: DataSource) => db.getRepository(MiUserPublickey),
inject: [DI.db], inject: [DI.db],
}; };
const $userListsRepository: Provider = { const $userListsRepository: Provider = {
provide: DI.userListsRepository, provide: DI.userListsRepository,
useFactory: (db: DataSource) => db.getRepository(UserList), useFactory: (db: DataSource) => db.getRepository(MiUserList),
inject: [DI.db], inject: [DI.db],
}; };
const $userListFavoritesRepository: Provider = { const $userListFavoritesRepository: Provider = {
provide: DI.userListFavoritesRepository, provide: DI.userListFavoritesRepository,
useFactory: (db: DataSource) => db.getRepository(UserListFavorite), useFactory: (db: DataSource) => db.getRepository(MiUserListFavorite),
inject: [DI.db], inject: [DI.db],
}; };
const $userListJoiningsRepository: Provider = { const $userListJoiningsRepository: Provider = {
provide: DI.userListJoiningsRepository, provide: DI.userListJoiningsRepository,
useFactory: (db: DataSource) => db.getRepository(UserListJoining), useFactory: (db: DataSource) => db.getRepository(MiUserListJoining),
inject: [DI.db], inject: [DI.db],
}; };
const $userNotePiningsRepository: Provider = { const $userNotePiningsRepository: Provider = {
provide: DI.userNotePiningsRepository, provide: DI.userNotePiningsRepository,
useFactory: (db: DataSource) => db.getRepository(UserNotePining), useFactory: (db: DataSource) => db.getRepository(MiUserNotePining),
inject: [DI.db], inject: [DI.db],
}; };
const $userIpsRepository: Provider = { const $userIpsRepository: Provider = {
provide: DI.userIpsRepository, provide: DI.userIpsRepository,
useFactory: (db: DataSource) => db.getRepository(UserIp), useFactory: (db: DataSource) => db.getRepository(MiUserIp),
inject: [DI.db], inject: [DI.db],
}; };
const $usedUsernamesRepository: Provider = { const $usedUsernamesRepository: Provider = {
provide: DI.usedUsernamesRepository, provide: DI.usedUsernamesRepository,
useFactory: (db: DataSource) => db.getRepository(UsedUsername), useFactory: (db: DataSource) => db.getRepository(MiUsedUsername),
inject: [DI.db], inject: [DI.db],
}; };
const $followingsRepository: Provider = { const $followingsRepository: Provider = {
provide: DI.followingsRepository, provide: DI.followingsRepository,
useFactory: (db: DataSource) => db.getRepository(Following), useFactory: (db: DataSource) => db.getRepository(MiFollowing),
inject: [DI.db], inject: [DI.db],
}; };
const $followRequestsRepository: Provider = { const $followRequestsRepository: Provider = {
provide: DI.followRequestsRepository, provide: DI.followRequestsRepository,
useFactory: (db: DataSource) => db.getRepository(FollowRequest), useFactory: (db: DataSource) => db.getRepository(MiFollowRequest),
inject: [DI.db], inject: [DI.db],
}; };
const $instancesRepository: Provider = { const $instancesRepository: Provider = {
provide: DI.instancesRepository, provide: DI.instancesRepository,
useFactory: (db: DataSource) => db.getRepository(Instance), useFactory: (db: DataSource) => db.getRepository(MiInstance),
inject: [DI.db], inject: [DI.db],
}; };
const $emojisRepository: Provider = { const $emojisRepository: Provider = {
provide: DI.emojisRepository, provide: DI.emojisRepository,
useFactory: (db: DataSource) => db.getRepository(Emoji), useFactory: (db: DataSource) => db.getRepository(MiEmoji),
inject: [DI.db], inject: [DI.db],
}; };
const $driveFilesRepository: Provider = { const $driveFilesRepository: Provider = {
provide: DI.driveFilesRepository, provide: DI.driveFilesRepository,
useFactory: (db: DataSource) => db.getRepository(DriveFile), useFactory: (db: DataSource) => db.getRepository(MiDriveFile),
inject: [DI.db], inject: [DI.db],
}; };
const $driveFoldersRepository: Provider = { const $driveFoldersRepository: Provider = {
provide: DI.driveFoldersRepository, provide: DI.driveFoldersRepository,
useFactory: (db: DataSource) => db.getRepository(DriveFolder), useFactory: (db: DataSource) => db.getRepository(MiDriveFolder),
inject: [DI.db], inject: [DI.db],
}; };
const $metasRepository: Provider = { const $metasRepository: Provider = {
provide: DI.metasRepository, provide: DI.metasRepository,
useFactory: (db: DataSource) => db.getRepository(Meta), useFactory: (db: DataSource) => db.getRepository(MiMeta),
inject: [DI.db], inject: [DI.db],
}; };
const $mutingsRepository: Provider = { const $mutingsRepository: Provider = {
provide: DI.mutingsRepository, provide: DI.mutingsRepository,
useFactory: (db: DataSource) => db.getRepository(Muting), useFactory: (db: DataSource) => db.getRepository(MiMuting),
inject: [DI.db], inject: [DI.db],
}; };
const $renoteMutingsRepository: Provider = { const $renoteMutingsRepository: Provider = {
provide: DI.renoteMutingsRepository, provide: DI.renoteMutingsRepository,
useFactory: (db: DataSource) => db.getRepository(RenoteMuting), useFactory: (db: DataSource) => db.getRepository(MiRenoteMuting),
inject: [DI.db], inject: [DI.db],
}; };
const $blockingsRepository: Provider = { const $blockingsRepository: Provider = {
provide: DI.blockingsRepository, provide: DI.blockingsRepository,
useFactory: (db: DataSource) => db.getRepository(Blocking), useFactory: (db: DataSource) => db.getRepository(MiBlocking),
inject: [DI.db], inject: [DI.db],
}; };
const $swSubscriptionsRepository: Provider = { const $swSubscriptionsRepository: Provider = {
provide: DI.swSubscriptionsRepository, provide: DI.swSubscriptionsRepository,
useFactory: (db: DataSource) => db.getRepository(SwSubscription), useFactory: (db: DataSource) => db.getRepository(MiSwSubscription),
inject: [DI.db], inject: [DI.db],
}; };
const $hashtagsRepository: Provider = { const $hashtagsRepository: Provider = {
provide: DI.hashtagsRepository, provide: DI.hashtagsRepository,
useFactory: (db: DataSource) => db.getRepository(Hashtag), useFactory: (db: DataSource) => db.getRepository(MiHashtag),
inject: [DI.db], inject: [DI.db],
}; };
@ -227,181 +227,181 @@ const $abuseUserReportsRepository: Provider = {
const $registrationTicketsRepository: Provider = { const $registrationTicketsRepository: Provider = {
provide: DI.registrationTicketsRepository, provide: DI.registrationTicketsRepository,
useFactory: (db: DataSource) => db.getRepository(RegistrationTicket), useFactory: (db: DataSource) => db.getRepository(MiRegistrationTicket),
inject: [DI.db], inject: [DI.db],
}; };
const $authSessionsRepository: Provider = { const $authSessionsRepository: Provider = {
provide: DI.authSessionsRepository, provide: DI.authSessionsRepository,
useFactory: (db: DataSource) => db.getRepository(AuthSession), useFactory: (db: DataSource) => db.getRepository(MiAuthSession),
inject: [DI.db], inject: [DI.db],
}; };
const $accessTokensRepository: Provider = { const $accessTokensRepository: Provider = {
provide: DI.accessTokensRepository, provide: DI.accessTokensRepository,
useFactory: (db: DataSource) => db.getRepository(AccessToken), useFactory: (db: DataSource) => db.getRepository(MiAccessToken),
inject: [DI.db], inject: [DI.db],
}; };
const $signinsRepository: Provider = { const $signinsRepository: Provider = {
provide: DI.signinsRepository, provide: DI.signinsRepository,
useFactory: (db: DataSource) => db.getRepository(Signin), useFactory: (db: DataSource) => db.getRepository(MiSignin),
inject: [DI.db], inject: [DI.db],
}; };
const $pagesRepository: Provider = { const $pagesRepository: Provider = {
provide: DI.pagesRepository, provide: DI.pagesRepository,
useFactory: (db: DataSource) => db.getRepository(Page), useFactory: (db: DataSource) => db.getRepository(MiPage),
inject: [DI.db], inject: [DI.db],
}; };
const $pageLikesRepository: Provider = { const $pageLikesRepository: Provider = {
provide: DI.pageLikesRepository, provide: DI.pageLikesRepository,
useFactory: (db: DataSource) => db.getRepository(PageLike), useFactory: (db: DataSource) => db.getRepository(MiPageLike),
inject: [DI.db], inject: [DI.db],
}; };
const $galleryPostsRepository: Provider = { const $galleryPostsRepository: Provider = {
provide: DI.galleryPostsRepository, provide: DI.galleryPostsRepository,
useFactory: (db: DataSource) => db.getRepository(GalleryPost), useFactory: (db: DataSource) => db.getRepository(MiGalleryPost),
inject: [DI.db], inject: [DI.db],
}; };
const $galleryLikesRepository: Provider = { const $galleryLikesRepository: Provider = {
provide: DI.galleryLikesRepository, provide: DI.galleryLikesRepository,
useFactory: (db: DataSource) => db.getRepository(GalleryLike), useFactory: (db: DataSource) => db.getRepository(MiGalleryLike),
inject: [DI.db], inject: [DI.db],
}; };
const $moderationLogsRepository: Provider = { const $moderationLogsRepository: Provider = {
provide: DI.moderationLogsRepository, provide: DI.moderationLogsRepository,
useFactory: (db: DataSource) => db.getRepository(ModerationLog), useFactory: (db: DataSource) => db.getRepository(MiModerationLog),
inject: [DI.db], inject: [DI.db],
}; };
const $clipsRepository: Provider = { const $clipsRepository: Provider = {
provide: DI.clipsRepository, provide: DI.clipsRepository,
useFactory: (db: DataSource) => db.getRepository(Clip), useFactory: (db: DataSource) => db.getRepository(MiClip),
inject: [DI.db], inject: [DI.db],
}; };
const $clipNotesRepository: Provider = { const $clipNotesRepository: Provider = {
provide: DI.clipNotesRepository, provide: DI.clipNotesRepository,
useFactory: (db: DataSource) => db.getRepository(ClipNote), useFactory: (db: DataSource) => db.getRepository(MiClipNote),
inject: [DI.db], inject: [DI.db],
}; };
const $clipFavoritesRepository: Provider = { const $clipFavoritesRepository: Provider = {
provide: DI.clipFavoritesRepository, provide: DI.clipFavoritesRepository,
useFactory: (db: DataSource) => db.getRepository(ClipFavorite), useFactory: (db: DataSource) => db.getRepository(MiClipFavorite),
inject: [DI.db], inject: [DI.db],
}; };
const $antennasRepository: Provider = { const $antennasRepository: Provider = {
provide: DI.antennasRepository, provide: DI.antennasRepository,
useFactory: (db: DataSource) => db.getRepository(Antenna), useFactory: (db: DataSource) => db.getRepository(MiAntenna),
inject: [DI.db], inject: [DI.db],
}; };
const $promoNotesRepository: Provider = { const $promoNotesRepository: Provider = {
provide: DI.promoNotesRepository, provide: DI.promoNotesRepository,
useFactory: (db: DataSource) => db.getRepository(PromoNote), useFactory: (db: DataSource) => db.getRepository(MiPromoNote),
inject: [DI.db], inject: [DI.db],
}; };
const $promoReadsRepository: Provider = { const $promoReadsRepository: Provider = {
provide: DI.promoReadsRepository, provide: DI.promoReadsRepository,
useFactory: (db: DataSource) => db.getRepository(PromoRead), useFactory: (db: DataSource) => db.getRepository(MiPromoRead),
inject: [DI.db], inject: [DI.db],
}; };
const $relaysRepository: Provider = { const $relaysRepository: Provider = {
provide: DI.relaysRepository, provide: DI.relaysRepository,
useFactory: (db: DataSource) => db.getRepository(Relay), useFactory: (db: DataSource) => db.getRepository(MiRelay),
inject: [DI.db], inject: [DI.db],
}; };
const $mutedNotesRepository: Provider = { const $mutedNotesRepository: Provider = {
provide: DI.mutedNotesRepository, provide: DI.mutedNotesRepository,
useFactory: (db: DataSource) => db.getRepository(MutedNote), useFactory: (db: DataSource) => db.getRepository(MiMutedNote),
inject: [DI.db], inject: [DI.db],
}; };
const $channelsRepository: Provider = { const $channelsRepository: Provider = {
provide: DI.channelsRepository, provide: DI.channelsRepository,
useFactory: (db: DataSource) => db.getRepository(Channel), useFactory: (db: DataSource) => db.getRepository(MiChannel),
inject: [DI.db], inject: [DI.db],
}; };
const $channelFollowingsRepository: Provider = { const $channelFollowingsRepository: Provider = {
provide: DI.channelFollowingsRepository, provide: DI.channelFollowingsRepository,
useFactory: (db: DataSource) => db.getRepository(ChannelFollowing), useFactory: (db: DataSource) => db.getRepository(MiChannelFollowing),
inject: [DI.db], inject: [DI.db],
}; };
const $channelFavoritesRepository: Provider = { const $channelFavoritesRepository: Provider = {
provide: DI.channelFavoritesRepository, provide: DI.channelFavoritesRepository,
useFactory: (db: DataSource) => db.getRepository(ChannelFavorite), useFactory: (db: DataSource) => db.getRepository(MiChannelFavorite),
inject: [DI.db], inject: [DI.db],
}; };
const $registryItemsRepository: Provider = { const $registryItemsRepository: Provider = {
provide: DI.registryItemsRepository, provide: DI.registryItemsRepository,
useFactory: (db: DataSource) => db.getRepository(RegistryItem), useFactory: (db: DataSource) => db.getRepository(MiRegistryItem),
inject: [DI.db], inject: [DI.db],
}; };
const $webhooksRepository: Provider = { const $webhooksRepository: Provider = {
provide: DI.webhooksRepository, provide: DI.webhooksRepository,
useFactory: (db: DataSource) => db.getRepository(Webhook), useFactory: (db: DataSource) => db.getRepository(MiWebhook),
inject: [DI.db], inject: [DI.db],
}; };
const $adsRepository: Provider = { const $adsRepository: Provider = {
provide: DI.adsRepository, provide: DI.adsRepository,
useFactory: (db: DataSource) => db.getRepository(Ad), useFactory: (db: DataSource) => db.getRepository(MiAd),
inject: [DI.db], inject: [DI.db],
}; };
const $passwordResetRequestsRepository: Provider = { const $passwordResetRequestsRepository: Provider = {
provide: DI.passwordResetRequestsRepository, provide: DI.passwordResetRequestsRepository,
useFactory: (db: DataSource) => db.getRepository(PasswordResetRequest), useFactory: (db: DataSource) => db.getRepository(MiPasswordResetRequest),
inject: [DI.db], inject: [DI.db],
}; };
const $retentionAggregationsRepository: Provider = { const $retentionAggregationsRepository: Provider = {
provide: DI.retentionAggregationsRepository, provide: DI.retentionAggregationsRepository,
useFactory: (db: DataSource) => db.getRepository(RetentionAggregation), useFactory: (db: DataSource) => db.getRepository(MiRetentionAggregation),
inject: [DI.db], inject: [DI.db],
}; };
const $flashsRepository: Provider = { const $flashsRepository: Provider = {
provide: DI.flashsRepository, provide: DI.flashsRepository,
useFactory: (db: DataSource) => db.getRepository(Flash), useFactory: (db: DataSource) => db.getRepository(MiFlash),
inject: [DI.db], inject: [DI.db],
}; };
const $flashLikesRepository: Provider = { const $flashLikesRepository: Provider = {
provide: DI.flashLikesRepository, provide: DI.flashLikesRepository,
useFactory: (db: DataSource) => db.getRepository(FlashLike), useFactory: (db: DataSource) => db.getRepository(MiFlashLike),
inject: [DI.db], inject: [DI.db],
}; };
const $rolesRepository: Provider = { const $rolesRepository: Provider = {
provide: DI.rolesRepository, provide: DI.rolesRepository,
useFactory: (db: DataSource) => db.getRepository(Role), useFactory: (db: DataSource) => db.getRepository(MiRole),
inject: [DI.db], inject: [DI.db],
}; };
const $roleAssignmentsRepository: Provider = { const $roleAssignmentsRepository: Provider = {
provide: DI.roleAssignmentsRepository, provide: DI.roleAssignmentsRepository,
useFactory: (db: DataSource) => db.getRepository(RoleAssignment), useFactory: (db: DataSource) => db.getRepository(MiRoleAssignment),
inject: [DI.db], inject: [DI.db],
}; };
const $userMemosRepository: Provider = { const $userMemosRepository: Provider = {
provide: DI.userMemosRepository, provide: DI.userMemosRepository,
useFactory: (db: DataSource) => db.getRepository(UserMemo), useFactory: (db: DataSource) => db.getRepository(MiUserMemo),
inject: [DI.db], inject: [DI.db],
}; };