summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/MutedNote.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-03 20:26:11 +0900
committerMar0xy <marie@kaifa.ch>2023-10-13 17:58:11 +0200
commitf6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d (patch)
treed3c10281ce2bfee3f79162f658565c28c64c1bbf /packages/backend/src/models/MutedNote.ts
parentupd: delete reactions properly in the DB (diff)
downloadsharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.tar.gz
sharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.tar.bz2
sharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.zip
merge: timeline 1
Diffstat (limited to 'packages/backend/src/models/MutedNote.ts')
-rw-r--r--packages/backend/src/models/MutedNote.ts53
1 files changed, 0 insertions, 53 deletions
diff --git a/packages/backend/src/models/MutedNote.ts b/packages/backend/src/models/MutedNote.ts
deleted file mode 100644
index 89a678a2a7..0000000000
--- a/packages/backend/src/models/MutedNote.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
-import { mutedNoteReasons } from '@/types.js';
-import { id } from './util/id.js';
-import { MiNote } from './Note.js';
-import { MiUser } from './User.js';
-
-@Entity('muted_note')
-@Index(['noteId', 'userId'], { unique: true })
-export class MiMutedNote {
- @PrimaryColumn(id())
- public id: string;
-
- @Index()
- @Column({
- ...id(),
- comment: 'The note ID.',
- })
- public noteId: MiNote['id'];
-
- @ManyToOne(type => MiNote, {
- onDelete: 'CASCADE',
- })
- @JoinColumn()
- public note: MiNote | null;
-
- @Index()
- @Column({
- ...id(),
- comment: 'The user ID.',
- })
- public userId: MiUser['id'];
-
- @ManyToOne(type => MiUser, {
- onDelete: 'CASCADE',
- })
- @JoinColumn()
- public user: MiUser | null;
-
- /**
- * ミュートされた理由。
- */
- @Index()
- @Column('enum', {
- enum: mutedNoteReasons,
- comment: 'The reason of the MutedNote.',
- })
- public reason: typeof mutedNoteReasons[number];
-}