aboutsummaryrefslogtreecommitdiff
path: root/src/db/model/File.ts
diff options
context:
space:
mode:
authorTom Harley2018-02-22 18:32:15 +0000
committerTom Harley2018-02-22 18:32:15 +0000
commit59c4e0f06b2bfb41c17111017823daa15900f94a (patch)
tree725ccb6573c5b0a1f640a43aa65eaf40a8fa0d45 /src/db/model/File.ts
parentMerge branch 'trh/error-middleware' into 'trh/payload-checker' (diff)
parentMerge branch 'trh/editorconfig' into 'master' (diff)
downloadmedicine-59c4e0f06b2bfb41c17111017823daa15900f94a.tar.gz
medicine-59c4e0f06b2bfb41c17111017823daa15900f94a.zip

Merge branch ‘master’ into trh/payload-checker

Diffstat (limited to 'src/db/model/File.ts')
-rw-r--r--src/db/model/File.ts47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/db/model/File.ts b/src/db/model/File.ts
deleted file mode 100644
index 225512d..0000000
--- a/src/db/model/File.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { default as Project } from './Project';
-import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, HasMany,
- HasOne, Model, PrimaryKey, Table, UpdatedAt } from 'sequelize-typescript';
-import { default as User } from './User';
-
-@Table
-export default class File extends Model<File> {
- @Column
- public name: string = '';
-
- @PrimaryKey
- @Column
- public uuid: string = '';
-
- @Column
- public mimetype: string = '';
-
- @ForeignKey(() => File)
- @AllowNull
- @Column(DataType.TEXT)
- public parentFolderId: string | null = null;
-
- @BelongsTo(() => File)
- public parentFolder: File = new File();
-
- @HasMany(() => File)
- public containedFiles: File[] = [];
-
- @ForeignKey(() => User)
- @AllowNull
- @Column(DataType.TEXT)
- public creatorName: string | null = null;
-
- @BelongsTo(() => User)
- public creator: User = new User();
-
- @HasOne(() => Project)
- public rootFolderOf: Project = new Project();
-
- @CreatedAt
- @Column
- public uploadDate: Date = new Date();
-
- @UpdatedAt
- @Column
- public modifyDate: Date = new Date();
-}