summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/entities/ChannelFollowing.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-08-16 17:51:28 +0900
committerGitHub <noreply@github.com>2023-08-16 17:51:28 +0900
commit792622aeadf3e36d50cddec3c64b2ff0105ea927 (patch)
treec42a71da86be3c33e2752b4c673e280b1158e57b /packages/backend/src/models/entities/ChannelFollowing.ts
parentbuild(deps): bump actions/setup-node from 3.7.0 to 3.8.0 (#11726) (diff)
downloadmisskey-792622aeadf3e36d50cddec3c64b2ff0105ea927.tar.gz
misskey-792622aeadf3e36d50cddec3c64b2ff0105ea927.tar.bz2
misskey-792622aeadf3e36d50cddec3c64b2ff0105ea927.zip
refactor: prefix Mi for all entities (#11719)
* wip * wip * wip * wip * Update RepositoryModule.ts * wip * wip * wip * Revert "wip" This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
Diffstat (limited to 'packages/backend/src/models/entities/ChannelFollowing.ts')
-rw-r--r--packages/backend/src/models/entities/ChannelFollowing.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/backend/src/models/entities/ChannelFollowing.ts b/packages/backend/src/models/entities/ChannelFollowing.ts
index c862cf3910..dc33eb144b 100644
--- a/packages/backend/src/models/entities/ChannelFollowing.ts
+++ b/packages/backend/src/models/entities/ChannelFollowing.ts
@@ -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;
}