summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/entities/UserNotePining.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/models/entities/UserNotePining.ts')
-rw-r--r--packages/backend/src/models/entities/UserNotePining.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/backend/src/models/entities/UserNotePining.ts b/packages/backend/src/models/entities/UserNotePining.ts
index a6362ca6b8..95bcb158b6 100644
--- a/packages/backend/src/models/entities/UserNotePining.ts
+++ b/packages/backend/src/models/entities/UserNotePining.ts
@@ -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;
}