summaryrefslogtreecommitdiff
path: root/src/models/entities/messaging-message.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-11-12 02:02:25 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-11-12 02:02:25 +0900
commit0e4a111f81cceed275d9bec2695f6e401fb654d8 (patch)
tree40874799472fa07416f17b50a398ac33b7771905 /src/models/entities/messaging-message.ts
parentupdate deps (diff)
downloadmisskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.gz
misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.bz2
misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.zip
refactoring
Resolve #7779
Diffstat (limited to 'src/models/entities/messaging-message.ts')
-rw-r--r--src/models/entities/messaging-message.ts89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/models/entities/messaging-message.ts b/src/models/entities/messaging-message.ts
deleted file mode 100644
index ac0764674c..0000000000
--- a/src/models/entities/messaging-message.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { User } from './user';
-import { DriveFile } from './drive-file';
-import { id } from '../id';
-import { UserGroup } from './user-group';
-
-@Entity()
-export class MessagingMessage {
- @PrimaryColumn(id())
- public id: string;
-
- @Index()
- @Column('timestamp with time zone', {
- comment: 'The created date of the MessagingMessage.'
- })
- public createdAt: Date;
-
- @Index()
- @Column({
- ...id(),
- comment: 'The sender user ID.'
- })
- public userId: User['id'];
-
- @ManyToOne(type => User, {
- onDelete: 'CASCADE'
- })
- @JoinColumn()
- public user: User | null;
-
- @Index()
- @Column({
- ...id(), nullable: true,
- comment: 'The recipient user ID.'
- })
- public recipientId: User['id'] | null;
-
- @ManyToOne(type => User, {
- onDelete: 'CASCADE'
- })
- @JoinColumn()
- public recipient: User | null;
-
- @Index()
- @Column({
- ...id(), nullable: true,
- comment: 'The recipient group ID.'
- })
- public groupId: UserGroup['id'] | null;
-
- @ManyToOne(type => UserGroup, {
- onDelete: 'CASCADE'
- })
- @JoinColumn()
- public group: UserGroup | null;
-
- @Column('varchar', {
- length: 4096, nullable: true
- })
- public text: string | null;
-
- @Column('boolean', {
- default: false,
- })
- public isRead: boolean;
-
- @Column('varchar', {
- length: 512, nullable: true,
- })
- public uri: string | null;
-
- @Column({
- ...id(),
- array: true, default: '{}'
- })
- public reads: User['id'][];
-
- @Column({
- ...id(),
- nullable: true,
- })
- public fileId: DriveFile['id'] | null;
-
- @ManyToOne(type => DriveFile, {
- onDelete: 'CASCADE'
- })
- @JoinColumn()
- public file: DriveFile | null;
-}