refactor: prefix Mi for all entities (#11719)

* wip

* wip

* wip

* wip

* Update RepositoryModule.ts

* wip

* wip

* wip

* Revert "wip"

This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
This commit is contained in:
syuilo 2023-08-16 17:51:28 +09:00 committed by GitHub
parent 9264ca336b
commit 792622aead
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
229 changed files with 1990 additions and 1990 deletions

View file

@ -7,10 +7,10 @@ import { Inject, Injectable } from '@nestjs/common';
import { ModuleRef } from '@nestjs/core';
import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { AccessTokensRepository, FollowRequestsRepository, NotesRepository, User, UsersRepository } from '@/models/index.js';
import type { AccessTokensRepository, FollowRequestsRepository, NotesRepository, MiUser, UsersRepository } from '@/models/index.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Notification } from '@/models/entities/Notification.js';
import type { Note } from '@/models/entities/Note.js';
import type { MiNotification } from '@/models/entities/Notification.js';
import type { MiNote } from '@/models/entities/Note.js';
import type { Packed } from '@/misc/json-schema.js';
import { bindThis } from '@/decorators.js';
import { isNotNull } from '@/misc/is-not-null.js';
@ -57,15 +57,15 @@ export class NotificationEntityService implements OnModuleInit {
@bindThis
public async pack(
src: Notification,
meId: User['id'],
src: MiNotification,
meId: MiUser['id'],
// eslint-disable-next-line @typescript-eslint/ban-types
options: {
},
hint?: {
packedNotes: Map<Note['id'], Packed<'Note'>>;
packedUsers: Map<User['id'], Packed<'User'>>;
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
packedUsers: Map<MiUser['id'], Packed<'User'>>;
},
): Promise<Packed<'Notification'>> {
const notification = src;
@ -108,8 +108,8 @@ export class NotificationEntityService implements OnModuleInit {
@bindThis
public async packMany(
notifications: Notification[],
meId: User['id'],
notifications: MiNotification[],
meId: MiUser['id'],
) {
if (notifications.length === 0) return [];