Refacor electron app and add migrations
This commit is contained in:
35
electron/entities/AttachmentEntity.ts
Normal file
35
electron/entities/AttachmentEntity.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryColumn,
|
||||
Column
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity('attachments')
|
||||
export class AttachmentEntity {
|
||||
@PrimaryColumn('text')
|
||||
id!: string;
|
||||
|
||||
@Column('text')
|
||||
messageId!: string;
|
||||
|
||||
@Column('text')
|
||||
filename!: string;
|
||||
|
||||
@Column('integer')
|
||||
size!: number;
|
||||
|
||||
@Column('text')
|
||||
mime!: string;
|
||||
|
||||
@Column('integer', { default: 0 })
|
||||
isImage!: number;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
uploaderPeerId!: string | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
filePath!: string | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
savedPath!: string | null;
|
||||
}
|
||||
Reference in New Issue
Block a user