This commit is contained in:
syuilo 2023-08-14 18:24:45 +09:00
parent c3fd848750
commit fd8d9f322c
200 changed files with 1607 additions and 1607 deletions

View file

@ -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()
@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;
/**
*