refactor: prefix Mi for all entities (#11719)
* wip
* wip
* wip
* wip
* Update RepositoryModule.ts
* wip
* wip
* wip
* Revert "wip"
This reverts commit c1c13b37d2
.
This commit is contained in:
@@ -5,403 +5,403 @@
|
||||
|
||||
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 { 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 { Provider } from '@nestjs/common';
|
||||
|
||||
const $usersRepository: Provider = {
|
||||
provide: DI.usersRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(User),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUser),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $notesRepository: Provider = {
|
||||
provide: DI.notesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Note),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiNote),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $announcementsRepository: Provider = {
|
||||
provide: DI.announcementsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Announcement),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAnnouncement),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $announcementReadsRepository: Provider = {
|
||||
provide: DI.announcementReadsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(AnnouncementRead),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAnnouncementRead),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $appsRepository: Provider = {
|
||||
provide: DI.appsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(App),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiApp),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $noteFavoritesRepository: Provider = {
|
||||
provide: DI.noteFavoritesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(NoteFavorite),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiNoteFavorite),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $noteThreadMutingsRepository: Provider = {
|
||||
provide: DI.noteThreadMutingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(NoteThreadMuting),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiNoteThreadMuting),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $noteReactionsRepository: Provider = {
|
||||
provide: DI.noteReactionsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(NoteReaction),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiNoteReaction),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $noteUnreadsRepository: Provider = {
|
||||
provide: DI.noteUnreadsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(NoteUnread),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiNoteUnread),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $pollsRepository: Provider = {
|
||||
provide: DI.pollsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Poll),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPoll),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $pollVotesRepository: Provider = {
|
||||
provide: DI.pollVotesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(PollVote),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPollVote),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userProfilesRepository: Provider = {
|
||||
provide: DI.userProfilesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserProfile),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserProfile),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userKeypairsRepository: Provider = {
|
||||
provide: DI.userKeypairsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserKeypair),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserKeypair),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userPendingsRepository: Provider = {
|
||||
provide: DI.userPendingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserPending),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserPending),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $attestationChallengesRepository: Provider = {
|
||||
provide: DI.attestationChallengesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(AttestationChallenge),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAttestationChallenge),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userSecurityKeysRepository: Provider = {
|
||||
provide: DI.userSecurityKeysRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserSecurityKey),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserSecurityKey),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userPublickeysRepository: Provider = {
|
||||
provide: DI.userPublickeysRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserPublickey),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserPublickey),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userListsRepository: Provider = {
|
||||
provide: DI.userListsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserList),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserList),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userListFavoritesRepository: Provider = {
|
||||
provide: DI.userListFavoritesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserListFavorite),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserListFavorite),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userListJoiningsRepository: Provider = {
|
||||
provide: DI.userListJoiningsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserListJoining),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserListJoining),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userNotePiningsRepository: Provider = {
|
||||
provide: DI.userNotePiningsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserNotePining),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserNotePining),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userIpsRepository: Provider = {
|
||||
provide: DI.userIpsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserIp),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserIp),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $usedUsernamesRepository: Provider = {
|
||||
provide: DI.usedUsernamesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UsedUsername),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUsedUsername),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $followingsRepository: Provider = {
|
||||
provide: DI.followingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Following),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiFollowing),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $followRequestsRepository: Provider = {
|
||||
provide: DI.followRequestsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(FollowRequest),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiFollowRequest),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $instancesRepository: Provider = {
|
||||
provide: DI.instancesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Instance),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiInstance),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $emojisRepository: Provider = {
|
||||
provide: DI.emojisRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Emoji),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiEmoji),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $driveFilesRepository: Provider = {
|
||||
provide: DI.driveFilesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(DriveFile),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiDriveFile),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $driveFoldersRepository: Provider = {
|
||||
provide: DI.driveFoldersRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(DriveFolder),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiDriveFolder),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $metasRepository: Provider = {
|
||||
provide: DI.metasRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Meta),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiMeta),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $mutingsRepository: Provider = {
|
||||
provide: DI.mutingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Muting),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiMuting),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $renoteMutingsRepository: Provider = {
|
||||
provide: DI.renoteMutingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(RenoteMuting),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRenoteMuting),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $blockingsRepository: Provider = {
|
||||
provide: DI.blockingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Blocking),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiBlocking),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $swSubscriptionsRepository: Provider = {
|
||||
provide: DI.swSubscriptionsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(SwSubscription),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiSwSubscription),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $hashtagsRepository: Provider = {
|
||||
provide: DI.hashtagsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Hashtag),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiHashtag),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $abuseUserReportsRepository: Provider = {
|
||||
provide: DI.abuseUserReportsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(AbuseUserReport),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAbuseUserReport),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $registrationTicketsRepository: Provider = {
|
||||
provide: DI.registrationTicketsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(RegistrationTicket),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRegistrationTicket),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $authSessionsRepository: Provider = {
|
||||
provide: DI.authSessionsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(AuthSession),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAuthSession),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $accessTokensRepository: Provider = {
|
||||
provide: DI.accessTokensRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(AccessToken),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAccessToken),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $signinsRepository: Provider = {
|
||||
provide: DI.signinsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Signin),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiSignin),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $pagesRepository: Provider = {
|
||||
provide: DI.pagesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Page),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPage),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $pageLikesRepository: Provider = {
|
||||
provide: DI.pageLikesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(PageLike),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPageLike),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $galleryPostsRepository: Provider = {
|
||||
provide: DI.galleryPostsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(GalleryPost),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiGalleryPost),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $galleryLikesRepository: Provider = {
|
||||
provide: DI.galleryLikesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(GalleryLike),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiGalleryLike),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $moderationLogsRepository: Provider = {
|
||||
provide: DI.moderationLogsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(ModerationLog),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiModerationLog),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $clipsRepository: Provider = {
|
||||
provide: DI.clipsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Clip),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiClip),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $clipNotesRepository: Provider = {
|
||||
provide: DI.clipNotesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(ClipNote),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiClipNote),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $clipFavoritesRepository: Provider = {
|
||||
provide: DI.clipFavoritesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(ClipFavorite),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiClipFavorite),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $antennasRepository: Provider = {
|
||||
provide: DI.antennasRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Antenna),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAntenna),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $promoNotesRepository: Provider = {
|
||||
provide: DI.promoNotesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(PromoNote),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPromoNote),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $promoReadsRepository: Provider = {
|
||||
provide: DI.promoReadsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(PromoRead),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPromoRead),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $relaysRepository: Provider = {
|
||||
provide: DI.relaysRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Relay),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRelay),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $mutedNotesRepository: Provider = {
|
||||
provide: DI.mutedNotesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(MutedNote),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiMutedNote),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $channelsRepository: Provider = {
|
||||
provide: DI.channelsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Channel),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiChannel),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $channelFollowingsRepository: Provider = {
|
||||
provide: DI.channelFollowingsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(ChannelFollowing),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiChannelFollowing),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $channelFavoritesRepository: Provider = {
|
||||
provide: DI.channelFavoritesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(ChannelFavorite),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiChannelFavorite),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $registryItemsRepository: Provider = {
|
||||
provide: DI.registryItemsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(RegistryItem),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRegistryItem),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $webhooksRepository: Provider = {
|
||||
provide: DI.webhooksRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Webhook),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiWebhook),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $adsRepository: Provider = {
|
||||
provide: DI.adsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Ad),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiAd),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $passwordResetRequestsRepository: Provider = {
|
||||
provide: DI.passwordResetRequestsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(PasswordResetRequest),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiPasswordResetRequest),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $retentionAggregationsRepository: Provider = {
|
||||
provide: DI.retentionAggregationsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(RetentionAggregation),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRetentionAggregation),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $flashsRepository: Provider = {
|
||||
provide: DI.flashsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Flash),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiFlash),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $flashLikesRepository: Provider = {
|
||||
provide: DI.flashLikesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(FlashLike),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiFlashLike),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $rolesRepository: Provider = {
|
||||
provide: DI.rolesRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(Role),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRole),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $roleAssignmentsRepository: Provider = {
|
||||
provide: DI.roleAssignmentsRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(RoleAssignment),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiRoleAssignment),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
const $userMemosRepository: Provider = {
|
||||
provide: DI.userMemosRepository,
|
||||
useFactory: (db: DataSource) => db.getRepository(UserMemo),
|
||||
useFactory: (db: DataSource) => db.getRepository(MiUserMemo),
|
||||
inject: [DI.db],
|
||||
};
|
||||
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class AbuseUserReport {
|
||||
@Entity('abuse_user_report')
|
||||
export class MiAbuseUserReport {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -20,35 +20,35 @@ export class AbuseUserReport {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public targetUserId: User['id'];
|
||||
public targetUserId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public targetUser: User | null;
|
||||
public targetUser: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public reporterId: User['id'];
|
||||
public reporterId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public reporter: User | null;
|
||||
public reporter: MiUser | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public assigneeId: User['id'] | null;
|
||||
public assigneeId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public assignee: User | null;
|
||||
public assignee: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { App } from './App.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiApp } from './App.js';
|
||||
|
||||
@Entity()
|
||||
export class AccessToken {
|
||||
@Entity('access_token')
|
||||
export class MiAccessToken {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -44,25 +44,25 @@ export class AccessToken {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public appId: App['id'] | null;
|
||||
public appId: MiApp['id'] | null;
|
||||
|
||||
@ManyToOne(type => App, {
|
||||
@ManyToOne(type => MiApp, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public app: App | null;
|
||||
public app: MiApp | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -6,8 +6,8 @@
|
||||
import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
|
||||
@Entity()
|
||||
export class Ad {
|
||||
@Entity('ad')
|
||||
export class MiAd {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -64,7 +64,7 @@ export class Ad {
|
||||
default: 0, nullable: false,
|
||||
})
|
||||
public dayOfWeek: number;
|
||||
constructor(data: Partial<Ad>) {
|
||||
constructor(data: Partial<MiAd>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { Entity, Index, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Announcement {
|
||||
@Entity('announcement')
|
||||
export class MiAnnouncement {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -77,15 +77,15 @@ export class Announcement {
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
constructor(data: Partial<Announcement>) {
|
||||
constructor(data: Partial<MiAnnouncement>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Announcement } from './Announcement.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiAnnouncement } from './Announcement.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('announcement_read')
|
||||
@Index(['userId', 'announcementId'], { unique: true })
|
||||
export class AnnouncementRead {
|
||||
export class MiAnnouncementRead {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -21,21 +21,21 @@ export class AnnouncementRead {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public announcementId: Announcement['id'];
|
||||
public announcementId: MiAnnouncement['id'];
|
||||
|
||||
@ManyToOne(type => Announcement, {
|
||||
@ManyToOne(type => MiAnnouncement, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public announcement: Announcement | null;
|
||||
public announcement: MiAnnouncement | null;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { UserList } from './UserList.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiUserList } from './UserList.js';
|
||||
|
||||
@Entity()
|
||||
export class Antenna {
|
||||
@Entity('antenna')
|
||||
export class MiAntenna {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -27,13 +27,13 @@ export class Antenna {
|
||||
...id(),
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
@@ -48,13 +48,13 @@ export class Antenna {
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public userListId: UserList['id'] | null;
|
||||
public userListId: MiUserList['id'] | null;
|
||||
|
||||
@ManyToOne(type => UserList, {
|
||||
@ManyToOne(type => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userList: UserList | null;
|
||||
public userList: MiUserList | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, array: true,
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class App {
|
||||
@Entity('app')
|
||||
export class MiApp {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,13 +24,13 @@ export class App {
|
||||
nullable: true,
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
nullable: true,
|
||||
})
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
|
@@ -5,22 +5,22 @@
|
||||
|
||||
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class AttestationChallenge {
|
||||
@Entity('attestation_challenge')
|
||||
export class MiAttestationChallenge {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Index()
|
||||
@PrimaryColumn(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -41,7 +41,7 @@ export class AttestationChallenge {
|
||||
})
|
||||
public registrationChallenge: boolean;
|
||||
|
||||
constructor(data: Partial<AttestationChallenge>) {
|
||||
constructor(data: Partial<MiAttestationChallenge>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { App } from './App.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiApp } from './App.js';
|
||||
|
||||
@Entity()
|
||||
export class AuthSession {
|
||||
@Entity('auth_session')
|
||||
export class MiAuthSession {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -28,21 +28,21 @@ export class AuthSession {
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
nullable: true,
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public appId: App['id'];
|
||||
public appId: MiApp['id'];
|
||||
|
||||
@ManyToOne(type => App, {
|
||||
@ManyToOne(type => MiApp, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public app: App | null;
|
||||
public app: MiApp | null;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('blocking')
|
||||
@Index(['blockerId', 'blockeeId'], { unique: true })
|
||||
export class Blocking {
|
||||
export class MiBlocking {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,24 +24,24 @@ export class Blocking {
|
||||
...id(),
|
||||
comment: 'The blockee user ID.',
|
||||
})
|
||||
public blockeeId: User['id'];
|
||||
public blockeeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public blockee: User | null;
|
||||
public blockee: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The blocker user ID.',
|
||||
})
|
||||
public blockerId: User['id'];
|
||||
public blockerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public blocker: User | null;
|
||||
public blocker: MiUser | null;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { DriveFile } from './DriveFile.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiDriveFile } from './DriveFile.js';
|
||||
|
||||
@Entity()
|
||||
export class Channel {
|
||||
@Entity('channel')
|
||||
export class MiChannel {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -31,13 +31,13 @@ export class Channel {
|
||||
nullable: true,
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
@@ -56,13 +56,13 @@ export class Channel {
|
||||
nullable: true,
|
||||
comment: 'The ID of banner Channel.',
|
||||
})
|
||||
public bannerId: DriveFile['id'] | null;
|
||||
public bannerId: MiDriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFile, {
|
||||
@ManyToOne(type => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public banner: DriveFile | null;
|
||||
public banner: MiDriveFile | null;
|
||||
|
||||
@Column('varchar', {
|
||||
array: true, length: 128, default: '{}',
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Channel } from './Channel.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiChannel } from './Channel.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('channel_favorite')
|
||||
@Index(['userId', 'channelId'], { unique: true })
|
||||
export class ChannelFavorite {
|
||||
export class MiChannelFavorite {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,23 +24,23 @@ export class ChannelFavorite {
|
||||
@Column({
|
||||
...id(),
|
||||
})
|
||||
public channelId: Channel['id'];
|
||||
public channelId: MiChannel['id'];
|
||||
|
||||
@ManyToOne(type => Channel, {
|
||||
@ManyToOne(type => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public channel: Channel | null;
|
||||
public channel: MiChannel | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Channel } from './Channel.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiChannel } from './Channel.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('channel_following')
|
||||
@Index(['followerId', 'followeeId'], { unique: true })
|
||||
export class ChannelFollowing {
|
||||
export class MiChannelFollowing {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -25,24 +25,24 @@ export class ChannelFollowing {
|
||||
...id(),
|
||||
comment: 'The followee channel ID.',
|
||||
})
|
||||
public followeeId: Channel['id'];
|
||||
public followeeId: MiChannel['id'];
|
||||
|
||||
@ManyToOne(type => Channel, {
|
||||
@ManyToOne(type => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followee: Channel | null;
|
||||
public followee: MiChannel | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The follower user ID.',
|
||||
})
|
||||
public followerId: User['id'];
|
||||
public followerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public follower: User | null;
|
||||
public follower: MiUser | null;
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Clip {
|
||||
@Entity('clip')
|
||||
export class MiClip {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -28,13 +28,13 @@ export class Clip {
|
||||
...id(),
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Clip } from './Clip.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiClip } from './Clip.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('clip_favorite')
|
||||
@Index(['userId', 'clipId'], { unique: true })
|
||||
export class ClipFavorite {
|
||||
export class MiClipFavorite {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,20 +19,20 @@ export class ClipFavorite {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public clipId: Clip['id'];
|
||||
public clipId: MiClip['id'];
|
||||
|
||||
@ManyToOne(type => Clip, {
|
||||
@ManyToOne(type => MiClip, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public clip: Clip | null;
|
||||
public clip: MiClip | null;
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { Note } from './Note.js';
|
||||
import { Clip } from './Clip.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiClip } from './Clip.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('clip_note')
|
||||
@Index(['noteId', 'clipId'], { unique: true })
|
||||
export class ClipNote {
|
||||
export class MiClipNote {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,24 +19,24 @@ export class ClipNote {
|
||||
...id(),
|
||||
comment: 'The note ID.',
|
||||
})
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The clip ID.',
|
||||
})
|
||||
public clipId: Clip['id'];
|
||||
public clipId: MiClip['id'];
|
||||
|
||||
@ManyToOne(type => Clip, {
|
||||
@ManyToOne(type => MiClip, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public clip: Clip | null;
|
||||
public clip: MiClip | null;
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { DriveFolder } from './DriveFolder.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiDriveFolder } from './DriveFolder.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('drive_file')
|
||||
@Index(['userId', 'folderId', 'id'])
|
||||
export class DriveFile {
|
||||
export class MiDriveFile {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -26,13 +26,13 @@ export class DriveFile {
|
||||
nullable: true,
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -146,13 +146,13 @@ export class DriveFile {
|
||||
nullable: true,
|
||||
comment: 'The parent folder ID. If null, it means the DriveFile is located in root.',
|
||||
})
|
||||
public folderId: DriveFolder['id'] | null;
|
||||
public folderId: MiDriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFolder, {
|
||||
@ManyToOne(type => MiDriveFolder, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public folder: DriveFolder | null;
|
||||
public folder: MiDriveFolder | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class DriveFolder {
|
||||
@Entity('drive_folder')
|
||||
export class MiDriveFolder {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -30,13 +30,13 @@ export class DriveFolder {
|
||||
nullable: true,
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
@@ -44,11 +44,11 @@ export class DriveFolder {
|
||||
nullable: true,
|
||||
comment: 'The parent folder ID. If null, it means the DriveFolder is located in root.',
|
||||
})
|
||||
public parentId: DriveFolder['id'] | null;
|
||||
public parentId: MiDriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFolder, {
|
||||
@ManyToOne(type => MiDriveFolder, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public parent: DriveFolder | null;
|
||||
public parent: MiDriveFolder | null;
|
||||
}
|
||||
|
@@ -6,9 +6,9 @@
|
||||
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('emoji')
|
||||
@Index(['name', 'host'], { unique: true })
|
||||
export class Emoji {
|
||||
export class MiEmoji {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Flash {
|
||||
@Entity('flash')
|
||||
export class MiFlash {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -39,13 +39,13 @@ export class Flash {
|
||||
...id(),
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 65536,
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Flash } from './Flash.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiFlash } from './Flash.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('flash_like')
|
||||
@Index(['userId', 'flashId'], { unique: true })
|
||||
export class FlashLike {
|
||||
export class MiFlashLike {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,20 +19,20 @@ export class FlashLike {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public flashId: Flash['id'];
|
||||
public flashId: MiFlash['id'];
|
||||
|
||||
@ManyToOne(type => Flash, {
|
||||
@ManyToOne(type => MiFlash, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public flash: Flash | null;
|
||||
public flash: MiFlash | null;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('follow_request')
|
||||
@Index(['followerId', 'followeeId'], { unique: true })
|
||||
export class FollowRequest {
|
||||
export class MiFollowRequest {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -23,26 +23,26 @@ export class FollowRequest {
|
||||
...id(),
|
||||
comment: 'The followee user ID.',
|
||||
})
|
||||
public followeeId: User['id'];
|
||||
public followeeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followee: User | null;
|
||||
public followee: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The follower user ID.',
|
||||
})
|
||||
public followerId: User['id'];
|
||||
public followerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public follower: User | null;
|
||||
public follower: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('following')
|
||||
@Index(['followerId', 'followeeId'], { unique: true })
|
||||
export class Following {
|
||||
export class MiFollowing {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,26 +24,26 @@ export class Following {
|
||||
...id(),
|
||||
comment: 'The followee user ID.',
|
||||
})
|
||||
public followeeId: User['id'];
|
||||
public followeeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followee: User | null;
|
||||
public followee: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The follower user ID.',
|
||||
})
|
||||
public followerId: User['id'];
|
||||
public followerId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public follower: User | null;
|
||||
public follower: MiUser | null;
|
||||
|
||||
//#region Denormalized fields
|
||||
@Index()
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { GalleryPost } from './GalleryPost.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiGalleryPost } from './GalleryPost.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('gallery_like')
|
||||
@Index(['userId', 'postId'], { unique: true })
|
||||
export class GalleryLike {
|
||||
export class MiGalleryLike {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,20 +19,20 @@ export class GalleryLike {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public postId: GalleryPost['id'];
|
||||
public postId: MiGalleryPost['id'];
|
||||
|
||||
@ManyToOne(type => GalleryPost, {
|
||||
@ManyToOne(type => MiGalleryPost, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public post: GalleryPost | null;
|
||||
public post: MiGalleryPost | null;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import type { DriveFile } from './DriveFile.js';
|
||||
import { MiUser } from './User.js';
|
||||
import type { MiDriveFile } from './DriveFile.js';
|
||||
|
||||
@Entity()
|
||||
export class GalleryPost {
|
||||
@Entity('gallery_post')
|
||||
export class MiGalleryPost {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -40,20 +40,20 @@ export class GalleryPost {
|
||||
...id(),
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public fileIds: DriveFile['id'][];
|
||||
public fileIds: MiDriveFile['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
@@ -74,7 +74,7 @@ export class GalleryPost {
|
||||
})
|
||||
public tags: string[];
|
||||
|
||||
constructor(data: Partial<GalleryPost>) {
|
||||
constructor(data: Partial<MiGalleryPost>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import type { User } from './User.js';
|
||||
import type { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Hashtag {
|
||||
@Entity('hashtag')
|
||||
export class MiHashtag {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -22,7 +22,7 @@ export class Hashtag {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public mentionedUserIds: User['id'][];
|
||||
public mentionedUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
@@ -34,7 +34,7 @@ export class Hashtag {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public mentionedLocalUserIds: User['id'][];
|
||||
public mentionedLocalUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
@@ -46,7 +46,7 @@ export class Hashtag {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public mentionedRemoteUserIds: User['id'][];
|
||||
public mentionedRemoteUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
@@ -58,7 +58,7 @@ export class Hashtag {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public attachedUserIds: User['id'][];
|
||||
public attachedUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
@@ -70,7 +70,7 @@ export class Hashtag {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public attachedLocalUserIds: User['id'][];
|
||||
public attachedLocalUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
@@ -82,7 +82,7 @@ export class Hashtag {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public attachedRemoteUserIds: User['id'][];
|
||||
public attachedRemoteUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
|
@@ -6,8 +6,8 @@
|
||||
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
|
||||
@Entity()
|
||||
export class Instance {
|
||||
@Entity('instance')
|
||||
export class MiInstance {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Meta {
|
||||
@Entity('meta')
|
||||
export class MiMeta {
|
||||
@PrimaryColumn({
|
||||
type: 'varchar',
|
||||
length: 32,
|
||||
@@ -139,13 +139,13 @@ export class Meta {
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public proxyAccountId: User['id'] | null;
|
||||
public proxyAccountId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public proxyAccount: User | null;
|
||||
public proxyAccount: MiUser | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class ModerationLog {
|
||||
@Entity('moderation_log')
|
||||
export class MiModerationLog {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,13 +19,13 @@ export class ModerationLog {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -6,12 +6,12 @@
|
||||
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { mutedNoteReasons } from '../../types.js';
|
||||
import { Note } from './Note.js';
|
||||
import { User } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('muted_note')
|
||||
@Index(['noteId', 'userId'], { unique: true })
|
||||
export class MutedNote {
|
||||
export class MiMutedNote {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -20,26 +20,26 @@ export class MutedNote {
|
||||
...id(),
|
||||
comment: 'The note ID.',
|
||||
})
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
/**
|
||||
* ミュートされた理由。
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('muting')
|
||||
@Index(['muterId', 'muteeId'], { unique: true })
|
||||
export class Muting {
|
||||
export class MiMuting {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -30,24 +30,24 @@ export class Muting {
|
||||
...id(),
|
||||
comment: 'The mutee user ID.',
|
||||
})
|
||||
public muteeId: User['id'];
|
||||
public muteeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public mutee: User | null;
|
||||
public mutee: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The muter user ID.',
|
||||
})
|
||||
public muterId: User['id'];
|
||||
public muterId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public muter: User | null;
|
||||
public muter: MiUser | null;
|
||||
}
|
||||
|
@@ -6,15 +6,15 @@
|
||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { noteVisibilities } from '../../types.js';
|
||||
import { User } from './User.js';
|
||||
import { Channel } from './Channel.js';
|
||||
import type { DriveFile } from './DriveFile.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiChannel } from './Channel.js';
|
||||
import type { MiDriveFile } from './DriveFile.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('note')
|
||||
@Index('IDX_NOTE_TAGS', { synchronize: false })
|
||||
@Index('IDX_NOTE_MENTIONS', { synchronize: false })
|
||||
@Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })
|
||||
export class Note {
|
||||
export class MiNote {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -30,13 +30,13 @@ export class Note {
|
||||
nullable: true,
|
||||
comment: 'The ID of reply target.',
|
||||
})
|
||||
public replyId: Note['id'] | null;
|
||||
public replyId: MiNote['id'] | null;
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public reply: Note | null;
|
||||
public reply: MiNote | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
@@ -44,13 +44,13 @@ export class Note {
|
||||
nullable: true,
|
||||
comment: 'The ID of renote target.',
|
||||
})
|
||||
public renoteId: Note['id'] | null;
|
||||
public renoteId: MiNote['id'] | null;
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public renote: Note | null;
|
||||
public renote: MiNote | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -79,13 +79,13 @@ export class Note {
|
||||
...id(),
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
@@ -144,7 +144,7 @@ export class Note {
|
||||
...id(),
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public fileIds: DriveFile['id'][];
|
||||
public fileIds: MiDriveFile['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -157,14 +157,14 @@ export class Note {
|
||||
...id(),
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public visibleUserIds: User['id'][];
|
||||
public visibleUserIds: MiUser['id'][];
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public mentions: User['id'][];
|
||||
public mentions: MiUser['id'][];
|
||||
|
||||
@Column('text', {
|
||||
default: '[]',
|
||||
@@ -193,13 +193,13 @@ export class Note {
|
||||
nullable: true,
|
||||
comment: 'The ID of source channel.',
|
||||
})
|
||||
public channelId: Channel['id'] | null;
|
||||
public channelId: MiChannel['id'] | null;
|
||||
|
||||
@ManyToOne(type => Channel, {
|
||||
@ManyToOne(type => MiChannel, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public channel: Channel | null;
|
||||
public channel: MiChannel | null;
|
||||
|
||||
//#region Denormalized fields
|
||||
@Index()
|
||||
@@ -214,7 +214,7 @@ export class Note {
|
||||
nullable: true,
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public replyUserId: User['id'] | null;
|
||||
public replyUserId: MiUser['id'] | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
@@ -227,7 +227,7 @@ export class Note {
|
||||
nullable: true,
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public renoteUserId: User['id'] | null;
|
||||
public renoteUserId: MiUser['id'] | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
@@ -236,7 +236,7 @@ export class Note {
|
||||
public renoteUserHost: string | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<Note>) {
|
||||
constructor(data: Partial<MiNote>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { Note } from './Note.js';
|
||||
import { User } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('note_favorite')
|
||||
@Index(['userId', 'noteId'], { unique: true })
|
||||
export class NoteFavorite {
|
||||
export class MiNoteFavorite {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -21,20 +21,20 @@ export class NoteFavorite {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Note } from './Note.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('note_reaction')
|
||||
@Index(['userId', 'noteId'], { unique: true })
|
||||
export class NoteReaction {
|
||||
export class MiNoteReaction {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -22,23 +22,23 @@ export class NoteReaction {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user?: User | null;
|
||||
public user?: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note?: Note | null;
|
||||
public note?: MiNote | null;
|
||||
|
||||
// TODO: 対象noteのuserIdを非正規化したい(「受け取ったリアクション一覧」のようなものを(JOIN無しで)実装したいため)
|
||||
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('note_thread_muting')
|
||||
@Index(['userId', 'threadId'], { unique: true })
|
||||
export class NoteThreadMuting {
|
||||
export class MiNoteThreadMuting {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -21,13 +21,13 @@ export class NoteThreadMuting {
|
||||
@Column({
|
||||
...id(),
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
|
@@ -5,35 +5,35 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Note } from './Note.js';
|
||||
import type { Channel } from './Channel.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import type { MiChannel } from './Channel.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('note_unread')
|
||||
@Index(['userId', 'noteId'], { unique: true })
|
||||
export class NoteUnread {
|
||||
export class MiNoteUnread {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
|
||||
/**
|
||||
* メンションか否か
|
||||
@@ -55,7 +55,7 @@ export class NoteUnread {
|
||||
...id(),
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public noteUserId: User['id'];
|
||||
public noteUserId: MiUser['id'];
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
@@ -63,6 +63,6 @@ export class NoteUnread {
|
||||
nullable: true,
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public noteChannelId: Channel['id'] | null;
|
||||
public noteChannelId: MiChannel['id'] | null;
|
||||
//#endregion
|
||||
}
|
||||
|
@@ -4,12 +4,12 @@
|
||||
*/
|
||||
|
||||
import { notificationTypes } from '@/types.js';
|
||||
import { User } from './User.js';
|
||||
import { Note } from './Note.js';
|
||||
import { FollowRequest } from './FollowRequest.js';
|
||||
import { AccessToken } from './AccessToken.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiFollowRequest } from './FollowRequest.js';
|
||||
import { MiAccessToken } from './AccessToken.js';
|
||||
|
||||
export type Notification = {
|
||||
export type MiNotification = {
|
||||
id: string;
|
||||
|
||||
// RedisのためDateではなくstring
|
||||
@@ -18,7 +18,7 @@ export type Notification = {
|
||||
/**
|
||||
* 通知の送信者(initiator)
|
||||
*/
|
||||
notifierId: User['id'] | null;
|
||||
notifierId: MiUser['id'] | null;
|
||||
|
||||
/**
|
||||
* 通知の種類。
|
||||
@@ -36,9 +36,9 @@ export type Notification = {
|
||||
*/
|
||||
type: typeof notificationTypes[number];
|
||||
|
||||
noteId: Note['id'] | null;
|
||||
noteId: MiNote['id'] | null;
|
||||
|
||||
followRequestId: FollowRequest['id'] | null;
|
||||
followRequestId: MiFollowRequest['id'] | null;
|
||||
|
||||
reaction: string | null;
|
||||
|
||||
@@ -66,5 +66,5 @@ export type Notification = {
|
||||
/**
|
||||
* アプリ通知のアプリ(のトークン)
|
||||
*/
|
||||
appAccessTokenId: AccessToken['id'] | null;
|
||||
appAccessTokenId: MiAccessToken['id'] | null;
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { DriveFile } from './DriveFile.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiDriveFile } from './DriveFile.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('page')
|
||||
@Index(['userId', 'name'], { unique: true })
|
||||
export class Page {
|
||||
export class MiPage {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -60,25 +60,25 @@ export class Page {
|
||||
...id(),
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public eyeCatchingImageId: DriveFile['id'] | null;
|
||||
public eyeCatchingImageId: MiDriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFile, {
|
||||
@ManyToOne(type => MiDriveFile, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public eyeCatchingImage: DriveFile | null;
|
||||
public eyeCatchingImage: MiDriveFile | null;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: [],
|
||||
@@ -109,14 +109,14 @@ export class Page {
|
||||
...id(),
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public visibleUserIds: User['id'][];
|
||||
public visibleUserIds: MiUser['id'][];
|
||||
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
})
|
||||
public likedCount: number;
|
||||
|
||||
constructor(data: Partial<Page>) {
|
||||
constructor(data: Partial<MiPage>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Page } from './Page.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiPage } from './Page.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('page_like')
|
||||
@Index(['userId', 'pageId'], { unique: true })
|
||||
export class PageLike {
|
||||
export class MiPageLike {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,20 +19,20 @@ export class PageLike {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public pageId: Page['id'];
|
||||
public pageId: MiPage['id'];
|
||||
|
||||
@ManyToOne(type => Page, {
|
||||
@ManyToOne(type => MiPage, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public page: Page | null;
|
||||
public page: MiPage | null;
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class PasswordResetRequest {
|
||||
@Entity('password_reset_request')
|
||||
export class MiPasswordResetRequest {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -25,11 +25,11 @@ export class PasswordResetRequest {
|
||||
@Column({
|
||||
...id(),
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
}
|
||||
|
@@ -6,19 +6,19 @@
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { noteVisibilities } from '../../types.js';
|
||||
import { Note } from './Note.js';
|
||||
import type { User } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import type { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Poll {
|
||||
@Entity('poll')
|
||||
export class MiPoll {
|
||||
@PrimaryColumn(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@OneToOne(type => Note, {
|
||||
@OneToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true,
|
||||
@@ -50,7 +50,7 @@ export class Poll {
|
||||
...id(),
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -60,7 +60,7 @@ export class Poll {
|
||||
public userHost: string | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<Poll>) {
|
||||
constructor(data: Partial<MiPoll>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Note } from './Note.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('poll_vote')
|
||||
@Index(['userId', 'noteId', 'choice'], { unique: true })
|
||||
export class PollVote {
|
||||
export class MiPollVote {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -22,23 +22,23 @@ export class PollVote {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
|
||||
@Column('integer')
|
||||
public choice: number;
|
||||
|
@@ -5,19 +5,19 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { Note } from './Note.js';
|
||||
import type { User } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import type { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class PromoNote {
|
||||
@Entity('promo_note')
|
||||
export class MiPromoNote {
|
||||
@PrimaryColumn(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@OneToOne(type => Note, {
|
||||
@OneToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
|
||||
@Column('timestamp with time zone')
|
||||
public expiresAt: Date;
|
||||
@@ -28,6 +28,6 @@ export class PromoNote {
|
||||
...id(),
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
//#endregion
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { Note } from './Note.js';
|
||||
import { User } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('promo_read')
|
||||
@Index(['userId', 'noteId'], { unique: true })
|
||||
export class PromoRead {
|
||||
export class MiPromoRead {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -21,20 +21,20 @@ export class PromoRead {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn, OneToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class RegistrationTicket {
|
||||
@Entity('registration_ticket')
|
||||
export class MiRegistrationTicket {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -26,31 +26,31 @@ export class RegistrationTicket {
|
||||
@Column('timestamp with time zone')
|
||||
public createdAt: Date;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public createdBy: User | null;
|
||||
public createdBy: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public createdById: User['id'] | null;
|
||||
public createdById: MiUser['id'] | null;
|
||||
|
||||
@OneToOne(type => User, {
|
||||
@OneToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public usedBy: User | null;
|
||||
public usedBy: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public usedById: User['id'] | null;
|
||||
public usedById: MiUser['id'] | null;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true,
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
|
||||
@Entity()
|
||||
export class RegistryItem {
|
||||
@Entity('registry_item')
|
||||
export class MiRegistryItem {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -28,13 +28,13 @@ export class RegistryItem {
|
||||
...id(),
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024,
|
||||
|
@@ -6,8 +6,8 @@
|
||||
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
|
||||
@Entity()
|
||||
export class Relay {
|
||||
@Entity('relay')
|
||||
export class MiRelay {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('renote_muting')
|
||||
@Index(['muterId', 'muteeId'], { unique: true })
|
||||
export class RenoteMuting {
|
||||
export class MiRenoteMuting {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,24 +24,24 @@ export class RenoteMuting {
|
||||
...id(),
|
||||
comment: 'The mutee user ID.',
|
||||
})
|
||||
public muteeId: User['id'];
|
||||
public muteeId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public mutee: User | null;
|
||||
public mutee: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The muter user ID.',
|
||||
})
|
||||
public muterId: User['id'];
|
||||
public muterId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public muter: User | null;
|
||||
public muter: MiUser | null;
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import type { User } from './User.js';
|
||||
import type { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class RetentionAggregation {
|
||||
@Entity('retention_aggregation')
|
||||
export class MiRetentionAggregation {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -33,7 +33,7 @@ export class RetentionAggregation {
|
||||
...id(),
|
||||
array: true,
|
||||
})
|
||||
public userIds: User['id'][];
|
||||
public userIds: MiUser['id'][];
|
||||
|
||||
@Column('integer', {
|
||||
})
|
||||
|
@@ -84,8 +84,8 @@ export type RoleCondFormulaValue =
|
||||
CondFormulaValueNotesLessThanOrEq |
|
||||
CondFormulaValueNotesMoreThanOrEq;
|
||||
|
||||
@Entity()
|
||||
export class Role {
|
||||
@Entity('role')
|
||||
export class MiRole {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { Role } from './Role.js';
|
||||
import { User } from './User.js';
|
||||
import { MiRole } from './Role.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('role_assignment')
|
||||
@Index(['userId', 'roleId'], { unique: true })
|
||||
export class RoleAssignment {
|
||||
export class MiRoleAssignment {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,26 +24,26 @@ export class RoleAssignment {
|
||||
...id(),
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The role ID.',
|
||||
})
|
||||
public roleId: Role['id'];
|
||||
public roleId: MiRole['id'];
|
||||
|
||||
@ManyToOne(type => Role, {
|
||||
@ManyToOne(type => MiRole, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public role: Role | null;
|
||||
public role: MiRole | null;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class Signin {
|
||||
@Entity('signin')
|
||||
export class MiSignin {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,13 +19,13 @@ export class Signin {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class SwSubscription {
|
||||
@Entity('sw_subscription')
|
||||
export class MiSwSubscription {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -17,13 +17,13 @@ export class SwSubscription {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
|
@@ -5,8 +5,8 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Column } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
export class UsedUsername {
|
||||
@Entity('used_username')
|
||||
export class MiUsedUsername {
|
||||
@PrimaryColumn('varchar', {
|
||||
length: 128,
|
||||
})
|
||||
@@ -15,7 +15,7 @@ export class UsedUsername {
|
||||
@Column('timestamp with time zone')
|
||||
public createdAt: Date;
|
||||
|
||||
constructor(data: Partial<UsedUsername>) {
|
||||
constructor(data: Partial<MiUsedUsername>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { DriveFile } from './DriveFile.js';
|
||||
import { MiDriveFile } from './DriveFile.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('user')
|
||||
@Index(['usernameLower', 'host'], { unique: true })
|
||||
export class User {
|
||||
export class MiUser {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -103,26 +103,26 @@ export class User {
|
||||
nullable: true,
|
||||
comment: 'The ID of avatar DriveFile.',
|
||||
})
|
||||
public avatarId: DriveFile['id'] | null;
|
||||
public avatarId: MiDriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => DriveFile, {
|
||||
@OneToOne(type => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public avatar: DriveFile | null;
|
||||
public avatar: MiDriveFile | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of banner DriveFile.',
|
||||
})
|
||||
public bannerId: DriveFile['id'] | null;
|
||||
public bannerId: MiDriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => DriveFile, {
|
||||
@OneToOne(type => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public banner: DriveFile | null;
|
||||
public banner: MiDriveFile | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
@@ -244,7 +244,7 @@ export class User {
|
||||
})
|
||||
public token: string | null;
|
||||
|
||||
constructor(data: Partial<User>) {
|
||||
constructor(data: Partial<MiUser>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
@@ -253,24 +253,24 @@ export class User {
|
||||
}
|
||||
}
|
||||
|
||||
export type LocalUser = User & {
|
||||
export type MiLocalUser = MiUser & {
|
||||
host: null;
|
||||
uri: null;
|
||||
}
|
||||
|
||||
export type PartialLocalUser = Partial<User> & {
|
||||
id: User['id'];
|
||||
export type MiPartialLocalUser = Partial<MiUser> & {
|
||||
id: MiUser['id'];
|
||||
host: null;
|
||||
uri: null;
|
||||
}
|
||||
|
||||
export type RemoteUser = User & {
|
||||
export type MiRemoteUser = MiUser & {
|
||||
host: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
export type PartialRemoteUser = Partial<User> & {
|
||||
id: User['id'];
|
||||
export type MiPartialRemoteUser = Partial<MiUser> & {
|
||||
id: MiUser['id'];
|
||||
host: string;
|
||||
uri: string;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { Entity, Index, Column, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import type { User } from './User.js';
|
||||
import type { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('user_ip')
|
||||
@Index(['userId', 'ip'], { unique: true })
|
||||
export class UserIp {
|
||||
export class MiUserIp {
|
||||
@PrimaryGeneratedColumn()
|
||||
public id: string;
|
||||
|
||||
@@ -19,7 +19,7 @@ export class UserIp {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -5,18 +5,18 @@
|
||||
|
||||
import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class UserKeypair {
|
||||
@Entity('user_keypair')
|
||||
export class MiUserKeypair {
|
||||
@PrimaryColumn(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@OneToOne(type => User, {
|
||||
@OneToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 4096,
|
||||
@@ -28,7 +28,7 @@ export class UserKeypair {
|
||||
})
|
||||
public privateKey: string;
|
||||
|
||||
constructor(data: Partial<UserKeypair>) {
|
||||
constructor(data: Partial<MiUserKeypair>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class UserList {
|
||||
@Entity('user_list')
|
||||
export class MiUserList {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -22,7 +22,7 @@ export class UserList {
|
||||
...id(),
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
@@ -30,11 +30,11 @@ export class UserList {
|
||||
})
|
||||
public isPublic: boolean;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { UserList } from './UserList.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiUserList } from './UserList.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('user_list_favorite')
|
||||
@Index(['userId', 'userListId'], { unique: true })
|
||||
export class UserListFavorite {
|
||||
export class MiUserListFavorite {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -19,20 +19,20 @@ export class UserListFavorite {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public userListId: UserList['id'];
|
||||
public userListId: MiUserList['id'];
|
||||
|
||||
@ManyToOne(type => UserList, {
|
||||
@ManyToOne(type => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userList: UserList | null;
|
||||
public userList: MiUserList | null;
|
||||
}
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { UserList } from './UserList.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiUserList } from './UserList.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('user_list_joining')
|
||||
@Index(['userId', 'userListId'], { unique: true })
|
||||
export class UserListJoining {
|
||||
export class MiUserListJoining {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,24 +24,24 @@ export class UserListJoining {
|
||||
...id(),
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The list ID.',
|
||||
})
|
||||
public userListId: UserList['id'];
|
||||
public userListId: MiUserList['id'];
|
||||
|
||||
@ManyToOne(type => UserList, {
|
||||
@ManyToOne(type => MiUserList, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userList: UserList | null;
|
||||
public userList: MiUserList | null;
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
import { Column, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('user_memo')
|
||||
@Index(['userId', 'targetUserId'], { unique: true })
|
||||
export class UserMemo {
|
||||
export class MiUserMemo {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -18,26 +18,26 @@ export class UserMemo {
|
||||
...id(),
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The ID of target user.',
|
||||
})
|
||||
public targetUserId: User['id'];
|
||||
public targetUserId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public targetUser: User | null;
|
||||
public targetUser: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048,
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { Note } from './Note.js';
|
||||
import { User } from './User.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('user_note_pining')
|
||||
@Index(['userId', 'noteId'], { unique: true })
|
||||
export class UserNotePining {
|
||||
export class MiUserNotePining {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -21,20 +21,20 @@ export class UserNotePining {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column(id())
|
||||
public noteId: Note['id'];
|
||||
public noteId: MiNote['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
@ManyToOne(type => MiNote, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
public note: MiNote | null;
|
||||
}
|
||||
|
@@ -6,8 +6,8 @@
|
||||
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
|
||||
@Entity()
|
||||
export class UserPending {
|
||||
@Entity('user_pending')
|
||||
export class MiUserPending {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
|
@@ -6,21 +6,21 @@
|
||||
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
|
||||
import { obsoleteNotificationTypes, ffVisibility, notificationTypes } from '@/types.js';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { Page } from './Page.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiPage } from './Page.js';
|
||||
|
||||
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
|
||||
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
|
||||
@Entity()
|
||||
export class UserProfile {
|
||||
@Entity('user_profile')
|
||||
export class MiUserProfile {
|
||||
@PrimaryColumn(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@OneToOne(type => User, {
|
||||
@OneToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
@@ -186,13 +186,13 @@ export class UserProfile {
|
||||
...id(),
|
||||
nullable: true,
|
||||
})
|
||||
public pinnedPageId: Page['id'] | null;
|
||||
public pinnedPageId: MiPage['id'] | null;
|
||||
|
||||
@OneToOne(type => Page, {
|
||||
@OneToOne(type => MiPage, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public pinnedPage: Page | null;
|
||||
public pinnedPage: MiPage | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
@@ -244,7 +244,7 @@ export class UserProfile {
|
||||
public userHost: string | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<UserProfile>) {
|
||||
constructor(data: Partial<MiUserProfile>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,18 +5,18 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class UserPublickey {
|
||||
@Entity('user_publickey')
|
||||
export class MiUserPublickey {
|
||||
@PrimaryColumn(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@OneToOne(type => User, {
|
||||
@OneToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index({ unique: true })
|
||||
@Column('varchar', {
|
||||
@@ -29,7 +29,7 @@ export class UserPublickey {
|
||||
})
|
||||
public keyPem: string;
|
||||
|
||||
constructor(data: Partial<UserPublickey>) {
|
||||
constructor(data: Partial<MiUserPublickey>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,10 +5,10 @@
|
||||
|
||||
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
@Entity()
|
||||
export class UserSecurityKey {
|
||||
@Entity('user_security_key')
|
||||
export class MiUserSecurityKey {
|
||||
@PrimaryColumn('varchar', {
|
||||
comment: 'Variable-length id given to navigator.credentials.get()',
|
||||
})
|
||||
@@ -16,13 +16,13 @@ export class UserSecurityKey {
|
||||
|
||||
@Index()
|
||||
@Column(id())
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -43,7 +43,7 @@ export class UserSecurityKey {
|
||||
})
|
||||
public name: string;
|
||||
|
||||
constructor(data: Partial<UserSecurityKey>) {
|
||||
constructor(data: Partial<MiUserSecurityKey>) {
|
||||
if (data == null) return;
|
||||
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
|
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { MiUser } from './User.js';
|
||||
|
||||
export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const;
|
||||
|
||||
@Entity()
|
||||
export class Webhook {
|
||||
@Entity('webhook')
|
||||
export class MiWebhook {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -24,13 +24,13 @@ export class Webhook {
|
||||
...id(),
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
public userId: MiUser['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
|
@@ -3,206 +3,206 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { AbuseUserReport } from '@/models/entities/AbuseUserReport.js';
|
||||
import { AccessToken } from '@/models/entities/AccessToken.js';
|
||||
import { Ad } from '@/models/entities/Ad.js';
|
||||
import { Announcement } from '@/models/entities/Announcement.js';
|
||||
import { AnnouncementRead } from '@/models/entities/AnnouncementRead.js';
|
||||
import { Antenna } from '@/models/entities/Antenna.js';
|
||||
import { App } from '@/models/entities/App.js';
|
||||
import { AttestationChallenge } from '@/models/entities/AttestationChallenge.js';
|
||||
import { AuthSession } from '@/models/entities/AuthSession.js';
|
||||
import { Blocking } from '@/models/entities/Blocking.js';
|
||||
import { ChannelFollowing } from '@/models/entities/ChannelFollowing.js';
|
||||
import { ChannelFavorite } from '@/models/entities/ChannelFavorite.js';
|
||||
import { Clip } from '@/models/entities/Clip.js';
|
||||
import { ClipNote } from '@/models/entities/ClipNote.js';
|
||||
import { ClipFavorite } from '@/models/entities/ClipFavorite.js';
|
||||
import { DriveFile } from '@/models/entities/DriveFile.js';
|
||||
import { DriveFolder } from '@/models/entities/DriveFolder.js';
|
||||
import { Emoji } from '@/models/entities/Emoji.js';
|
||||
import { Following } from '@/models/entities/Following.js';
|
||||
import { FollowRequest } from '@/models/entities/FollowRequest.js';
|
||||
import { GalleryLike } from '@/models/entities/GalleryLike.js';
|
||||
import { GalleryPost } from '@/models/entities/GalleryPost.js';
|
||||
import { Hashtag } from '@/models/entities/Hashtag.js';
|
||||
import { Instance } from '@/models/entities/Instance.js';
|
||||
import { Meta } from '@/models/entities/Meta.js';
|
||||
import { ModerationLog } from '@/models/entities/ModerationLog.js';
|
||||
import { MutedNote } from '@/models/entities/MutedNote.js';
|
||||
import { Muting } from '@/models/entities/Muting.js';
|
||||
import { RenoteMuting } from '@/models/entities/RenoteMuting.js';
|
||||
import { Note } from '@/models/entities/Note.js';
|
||||
import { NoteFavorite } from '@/models/entities/NoteFavorite.js';
|
||||
import { NoteReaction } from '@/models/entities/NoteReaction.js';
|
||||
import { NoteThreadMuting } from '@/models/entities/NoteThreadMuting.js';
|
||||
import { NoteUnread } from '@/models/entities/NoteUnread.js';
|
||||
import { Page } from '@/models/entities/Page.js';
|
||||
import { PageLike } from '@/models/entities/PageLike.js';
|
||||
import { PasswordResetRequest } from '@/models/entities/PasswordResetRequest.js';
|
||||
import { Poll } from '@/models/entities/Poll.js';
|
||||
import { PollVote } from '@/models/entities/PollVote.js';
|
||||
import { PromoNote } from '@/models/entities/PromoNote.js';
|
||||
import { PromoRead } from '@/models/entities/PromoRead.js';
|
||||
import { RegistrationTicket } from '@/models/entities/RegistrationTicket.js';
|
||||
import { RegistryItem } from '@/models/entities/RegistryItem.js';
|
||||
import { Relay } from '@/models/entities/Relay.js';
|
||||
import { Signin } from '@/models/entities/Signin.js';
|
||||
import { SwSubscription } from '@/models/entities/SwSubscription.js';
|
||||
import { UsedUsername } from '@/models/entities/UsedUsername.js';
|
||||
import { User } from '@/models/entities/User.js';
|
||||
import { UserIp } from '@/models/entities/UserIp.js';
|
||||
import { UserKeypair } from '@/models/entities/UserKeypair.js';
|
||||
import { UserList } from '@/models/entities/UserList.js';
|
||||
import { UserListJoining } from '@/models/entities/UserListJoining.js';
|
||||
import { UserNotePining } from '@/models/entities/UserNotePining.js';
|
||||
import { UserPending } from '@/models/entities/UserPending.js';
|
||||
import { UserProfile } from '@/models/entities/UserProfile.js';
|
||||
import { UserPublickey } from '@/models/entities/UserPublickey.js';
|
||||
import { UserSecurityKey } from '@/models/entities/UserSecurityKey.js';
|
||||
import { UserMemo } from '@/models/entities/UserMemo.js';
|
||||
import { Webhook } from '@/models/entities/Webhook.js';
|
||||
import { Channel } from '@/models/entities/Channel.js';
|
||||
import { RetentionAggregation } from '@/models/entities/RetentionAggregation.js';
|
||||
import { Role } from '@/models/entities/Role.js';
|
||||
import { RoleAssignment } from '@/models/entities/RoleAssignment.js';
|
||||
import { Flash } from '@/models/entities/Flash.js';
|
||||
import { FlashLike } from '@/models/entities/FlashLike.js';
|
||||
import { UserListFavorite } from './entities/UserListFavorite.js';
|
||||
import { MiAbuseUserReport } from '@/models/entities/AbuseUserReport.js';
|
||||
import { MiAccessToken } from '@/models/entities/AccessToken.js';
|
||||
import { MiAd } from '@/models/entities/Ad.js';
|
||||
import { MiAnnouncement } from '@/models/entities/Announcement.js';
|
||||
import { MiAnnouncementRead } from '@/models/entities/AnnouncementRead.js';
|
||||
import { MiAntenna } from '@/models/entities/Antenna.js';
|
||||
import { MiApp } from '@/models/entities/App.js';
|
||||
import { MiAttestationChallenge } from '@/models/entities/AttestationChallenge.js';
|
||||
import { MiAuthSession } from '@/models/entities/AuthSession.js';
|
||||
import { MiBlocking } from '@/models/entities/Blocking.js';
|
||||
import { MiChannelFollowing } from '@/models/entities/ChannelFollowing.js';
|
||||
import { MiChannelFavorite } from '@/models/entities/ChannelFavorite.js';
|
||||
import { MiClip } from '@/models/entities/Clip.js';
|
||||
import { MiClipNote } from '@/models/entities/ClipNote.js';
|
||||
import { MiClipFavorite } from '@/models/entities/ClipFavorite.js';
|
||||
import { MiDriveFile } from '@/models/entities/DriveFile.js';
|
||||
import { MiDriveFolder } from '@/models/entities/DriveFolder.js';
|
||||
import { MiEmoji } from '@/models/entities/Emoji.js';
|
||||
import { MiFollowing } from '@/models/entities/Following.js';
|
||||
import { MiFollowRequest } from '@/models/entities/FollowRequest.js';
|
||||
import { MiGalleryLike } from '@/models/entities/GalleryLike.js';
|
||||
import { MiGalleryPost } from '@/models/entities/GalleryPost.js';
|
||||
import { MiHashtag } from '@/models/entities/Hashtag.js';
|
||||
import { MiInstance } from '@/models/entities/Instance.js';
|
||||
import { MiMeta } from '@/models/entities/Meta.js';
|
||||
import { MiModerationLog } from '@/models/entities/ModerationLog.js';
|
||||
import { MiMutedNote } from '@/models/entities/MutedNote.js';
|
||||
import { MiMuting } from '@/models/entities/Muting.js';
|
||||
import { MiRenoteMuting } from '@/models/entities/RenoteMuting.js';
|
||||
import { MiNote } from '@/models/entities/Note.js';
|
||||
import { MiNoteFavorite } from '@/models/entities/NoteFavorite.js';
|
||||
import { MiNoteReaction } from '@/models/entities/NoteReaction.js';
|
||||
import { MiNoteThreadMuting } from '@/models/entities/NoteThreadMuting.js';
|
||||
import { MiNoteUnread } from '@/models/entities/NoteUnread.js';
|
||||
import { MiPage } from '@/models/entities/Page.js';
|
||||
import { MiPageLike } from '@/models/entities/PageLike.js';
|
||||
import { MiPasswordResetRequest } from '@/models/entities/PasswordResetRequest.js';
|
||||
import { MiPoll } from '@/models/entities/Poll.js';
|
||||
import { MiPollVote } from '@/models/entities/PollVote.js';
|
||||
import { MiPromoNote } from '@/models/entities/PromoNote.js';
|
||||
import { MiPromoRead } from '@/models/entities/PromoRead.js';
|
||||
import { MiRegistrationTicket } from '@/models/entities/RegistrationTicket.js';
|
||||
import { MiRegistryItem } from '@/models/entities/RegistryItem.js';
|
||||
import { MiRelay } from '@/models/entities/Relay.js';
|
||||
import { MiSignin } from '@/models/entities/Signin.js';
|
||||
import { MiSwSubscription } from '@/models/entities/SwSubscription.js';
|
||||
import { MiUsedUsername } from '@/models/entities/UsedUsername.js';
|
||||
import { MiUser } from '@/models/entities/User.js';
|
||||
import { MiUserIp } from '@/models/entities/UserIp.js';
|
||||
import { MiUserKeypair } from '@/models/entities/UserKeypair.js';
|
||||
import { MiUserList } from '@/models/entities/UserList.js';
|
||||
import { MiUserListJoining } from '@/models/entities/UserListJoining.js';
|
||||
import { MiUserNotePining } from '@/models/entities/UserNotePining.js';
|
||||
import { MiUserPending } from '@/models/entities/UserPending.js';
|
||||
import { MiUserProfile } from '@/models/entities/UserProfile.js';
|
||||
import { MiUserPublickey } from '@/models/entities/UserPublickey.js';
|
||||
import { MiUserSecurityKey } from '@/models/entities/UserSecurityKey.js';
|
||||
import { MiUserMemo } from '@/models/entities/UserMemo.js';
|
||||
import { MiWebhook } from '@/models/entities/Webhook.js';
|
||||
import { MiChannel } from '@/models/entities/Channel.js';
|
||||
import { MiRetentionAggregation } from '@/models/entities/RetentionAggregation.js';
|
||||
import { MiRole } from '@/models/entities/Role.js';
|
||||
import { MiRoleAssignment } from '@/models/entities/RoleAssignment.js';
|
||||
import { MiFlash } from '@/models/entities/Flash.js';
|
||||
import { MiFlashLike } from '@/models/entities/FlashLike.js';
|
||||
import { MiUserListFavorite } from './entities/UserListFavorite.js';
|
||||
import type { Repository } from 'typeorm';
|
||||
|
||||
export {
|
||||
AbuseUserReport,
|
||||
AccessToken,
|
||||
Ad,
|
||||
Announcement,
|
||||
AnnouncementRead,
|
||||
Antenna,
|
||||
App,
|
||||
AttestationChallenge,
|
||||
AuthSession,
|
||||
Blocking,
|
||||
ChannelFollowing,
|
||||
ChannelFavorite,
|
||||
Clip,
|
||||
ClipNote,
|
||||
ClipFavorite,
|
||||
DriveFile,
|
||||
DriveFolder,
|
||||
Emoji,
|
||||
Following,
|
||||
FollowRequest,
|
||||
GalleryLike,
|
||||
GalleryPost,
|
||||
Hashtag,
|
||||
Instance,
|
||||
Meta,
|
||||
ModerationLog,
|
||||
MutedNote,
|
||||
Muting,
|
||||
RenoteMuting,
|
||||
Note,
|
||||
NoteFavorite,
|
||||
NoteReaction,
|
||||
NoteThreadMuting,
|
||||
NoteUnread,
|
||||
Page,
|
||||
PageLike,
|
||||
PasswordResetRequest,
|
||||
Poll,
|
||||
PollVote,
|
||||
PromoNote,
|
||||
PromoRead,
|
||||
RegistrationTicket,
|
||||
RegistryItem,
|
||||
Relay,
|
||||
Signin,
|
||||
SwSubscription,
|
||||
UsedUsername,
|
||||
User,
|
||||
UserIp,
|
||||
UserKeypair,
|
||||
UserList,
|
||||
UserListFavorite,
|
||||
UserListJoining,
|
||||
UserNotePining,
|
||||
UserPending,
|
||||
UserProfile,
|
||||
UserPublickey,
|
||||
UserSecurityKey,
|
||||
Webhook,
|
||||
Channel,
|
||||
RetentionAggregation,
|
||||
Role,
|
||||
RoleAssignment,
|
||||
Flash,
|
||||
FlashLike,
|
||||
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<AbuseUserReport>;
|
||||
export type AccessTokensRepository = Repository<AccessToken>;
|
||||
export type AdsRepository = Repository<Ad>;
|
||||
export type AnnouncementsRepository = Repository<Announcement>;
|
||||
export type AnnouncementReadsRepository = Repository<AnnouncementRead>;
|
||||
export type AntennasRepository = Repository<Antenna>;
|
||||
export type AppsRepository = Repository<App>;
|
||||
export type AttestationChallengesRepository = Repository<AttestationChallenge>;
|
||||
export type AuthSessionsRepository = Repository<AuthSession>;
|
||||
export type BlockingsRepository = Repository<Blocking>;
|
||||
export type ChannelFollowingsRepository = Repository<ChannelFollowing>;
|
||||
export type ChannelFavoritesRepository = Repository<ChannelFavorite>;
|
||||
export type ClipsRepository = Repository<Clip>;
|
||||
export type ClipNotesRepository = Repository<ClipNote>;
|
||||
export type ClipFavoritesRepository = Repository<ClipFavorite>;
|
||||
export type DriveFilesRepository = Repository<DriveFile>;
|
||||
export type DriveFoldersRepository = Repository<DriveFolder>;
|
||||
export type EmojisRepository = Repository<Emoji>;
|
||||
export type FollowingsRepository = Repository<Following>;
|
||||
export type FollowRequestsRepository = Repository<FollowRequest>;
|
||||
export type GalleryLikesRepository = Repository<GalleryLike>;
|
||||
export type GalleryPostsRepository = Repository<GalleryPost>;
|
||||
export type HashtagsRepository = Repository<Hashtag>;
|
||||
export type InstancesRepository = Repository<Instance>;
|
||||
export type MetasRepository = Repository<Meta>;
|
||||
export type ModerationLogsRepository = Repository<ModerationLog>;
|
||||
export type MutedNotesRepository = Repository<MutedNote>;
|
||||
export type MutingsRepository = Repository<Muting>;
|
||||
export type RenoteMutingsRepository = Repository<RenoteMuting>;
|
||||
export type NotesRepository = Repository<Note>;
|
||||
export type NoteFavoritesRepository = Repository<NoteFavorite>;
|
||||
export type NoteReactionsRepository = Repository<NoteReaction>;
|
||||
export type NoteThreadMutingsRepository = Repository<NoteThreadMuting>;
|
||||
export type NoteUnreadsRepository = Repository<NoteUnread>;
|
||||
export type PagesRepository = Repository<Page>;
|
||||
export type PageLikesRepository = Repository<PageLike>;
|
||||
export type PasswordResetRequestsRepository = Repository<PasswordResetRequest>;
|
||||
export type PollsRepository = Repository<Poll>;
|
||||
export type PollVotesRepository = Repository<PollVote>;
|
||||
export type PromoNotesRepository = Repository<PromoNote>;
|
||||
export type PromoReadsRepository = Repository<PromoRead>;
|
||||
export type RegistrationTicketsRepository = Repository<RegistrationTicket>;
|
||||
export type RegistryItemsRepository = Repository<RegistryItem>;
|
||||
export type RelaysRepository = Repository<Relay>;
|
||||
export type SigninsRepository = Repository<Signin>;
|
||||
export type SwSubscriptionsRepository = Repository<SwSubscription>;
|
||||
export type UsedUsernamesRepository = Repository<UsedUsername>;
|
||||
export type UsersRepository = Repository<User>;
|
||||
export type UserIpsRepository = Repository<UserIp>;
|
||||
export type UserKeypairsRepository = Repository<UserKeypair>;
|
||||
export type UserListsRepository = Repository<UserList>;
|
||||
export type UserListFavoritesRepository = Repository<UserListFavorite>;
|
||||
export type UserListJoiningsRepository = Repository<UserListJoining>;
|
||||
export type UserNotePiningsRepository = Repository<UserNotePining>;
|
||||
export type UserPendingsRepository = Repository<UserPending>;
|
||||
export type UserProfilesRepository = Repository<UserProfile>;
|
||||
export type UserPublickeysRepository = Repository<UserPublickey>;
|
||||
export type UserSecurityKeysRepository = Repository<UserSecurityKey>;
|
||||
export type WebhooksRepository = Repository<Webhook>;
|
||||
export type ChannelsRepository = Repository<Channel>;
|
||||
export type RetentionAggregationsRepository = Repository<RetentionAggregation>;
|
||||
export type RolesRepository = Repository<Role>;
|
||||
export type RoleAssignmentsRepository = Repository<RoleAssignment>;
|
||||
export type FlashsRepository = Repository<Flash>;
|
||||
export type FlashLikesRepository = Repository<FlashLike>;
|
||||
export type UserMemoRepository = Repository<UserMemo>;
|
||||
export type AbuseUserReportsRepository = Repository<MiAbuseUserReport>;
|
||||
export type AccessTokensRepository = Repository<MiAccessToken>;
|
||||
export type AdsRepository = Repository<MiAd>;
|
||||
export type AnnouncementsRepository = Repository<MiAnnouncement>;
|
||||
export type AnnouncementReadsRepository = Repository<MiAnnouncementRead>;
|
||||
export type AntennasRepository = Repository<MiAntenna>;
|
||||
export type AppsRepository = Repository<MiApp>;
|
||||
export type AttestationChallengesRepository = Repository<MiAttestationChallenge>;
|
||||
export type AuthSessionsRepository = Repository<MiAuthSession>;
|
||||
export type BlockingsRepository = Repository<MiBlocking>;
|
||||
export type ChannelFollowingsRepository = Repository<MiChannelFollowing>;
|
||||
export type ChannelFavoritesRepository = Repository<MiChannelFavorite>;
|
||||
export type ClipsRepository = Repository<MiClip>;
|
||||
export type ClipNotesRepository = Repository<MiClipNote>;
|
||||
export type ClipFavoritesRepository = Repository<MiClipFavorite>;
|
||||
export type DriveFilesRepository = Repository<MiDriveFile>;
|
||||
export type DriveFoldersRepository = Repository<MiDriveFolder>;
|
||||
export type EmojisRepository = Repository<MiEmoji>;
|
||||
export type FollowingsRepository = Repository<MiFollowing>;
|
||||
export type FollowRequestsRepository = Repository<MiFollowRequest>;
|
||||
export type GalleryLikesRepository = Repository<MiGalleryLike>;
|
||||
export type GalleryPostsRepository = Repository<MiGalleryPost>;
|
||||
export type HashtagsRepository = Repository<MiHashtag>;
|
||||
export type InstancesRepository = Repository<MiInstance>;
|
||||
export type MetasRepository = Repository<MiMeta>;
|
||||
export type ModerationLogsRepository = Repository<MiModerationLog>;
|
||||
export type MutedNotesRepository = Repository<MiMutedNote>;
|
||||
export type MutingsRepository = Repository<MiMuting>;
|
||||
export type RenoteMutingsRepository = Repository<MiRenoteMuting>;
|
||||
export type NotesRepository = Repository<MiNote>;
|
||||
export type NoteFavoritesRepository = Repository<MiNoteFavorite>;
|
||||
export type NoteReactionsRepository = Repository<MiNoteReaction>;
|
||||
export type NoteThreadMutingsRepository = Repository<MiNoteThreadMuting>;
|
||||
export type NoteUnreadsRepository = Repository<MiNoteUnread>;
|
||||
export type PagesRepository = Repository<MiPage>;
|
||||
export type PageLikesRepository = Repository<MiPageLike>;
|
||||
export type PasswordResetRequestsRepository = Repository<MiPasswordResetRequest>;
|
||||
export type PollsRepository = Repository<MiPoll>;
|
||||
export type PollVotesRepository = Repository<MiPollVote>;
|
||||
export type PromoNotesRepository = Repository<MiPromoNote>;
|
||||
export type PromoReadsRepository = Repository<MiPromoRead>;
|
||||
export type RegistrationTicketsRepository = Repository<MiRegistrationTicket>;
|
||||
export type RegistryItemsRepository = Repository<MiRegistryItem>;
|
||||
export type RelaysRepository = Repository<MiRelay>;
|
||||
export type SigninsRepository = Repository<MiSignin>;
|
||||
export type SwSubscriptionsRepository = Repository<MiSwSubscription>;
|
||||
export type UsedUsernamesRepository = Repository<MiUsedUsername>;
|
||||
export type UsersRepository = Repository<MiUser>;
|
||||
export type UserIpsRepository = Repository<MiUserIp>;
|
||||
export type UserKeypairsRepository = Repository<MiUserKeypair>;
|
||||
export type UserListsRepository = Repository<MiUserList>;
|
||||
export type UserListFavoritesRepository = Repository<MiUserListFavorite>;
|
||||
export type UserListJoiningsRepository = Repository<MiUserListJoining>;
|
||||
export type UserNotePiningsRepository = Repository<MiUserNotePining>;
|
||||
export type UserPendingsRepository = Repository<MiUserPending>;
|
||||
export type UserProfilesRepository = Repository<MiUserProfile>;
|
||||
export type UserPublickeysRepository = Repository<MiUserPublickey>;
|
||||
export type UserSecurityKeysRepository = Repository<MiUserSecurityKey>;
|
||||
export type WebhooksRepository = Repository<MiWebhook>;
|
||||
export type ChannelsRepository = Repository<MiChannel>;
|
||||
export type RetentionAggregationsRepository = Repository<MiRetentionAggregation>;
|
||||
export type RolesRepository = Repository<MiRole>;
|
||||
export type RoleAssignmentsRepository = Repository<MiRoleAssignment>;
|
||||
export type FlashsRepository = Repository<MiFlash>;
|
||||
export type FlashLikesRepository = Repository<MiFlashLike>;
|
||||
export type UserMemoRepository = Repository<MiUserMemo>;
|
||||
|
Reference in New Issue
Block a user