aboutsummaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/models')
-rw-r--r--src/models/file-cache.ts14
-rw-r--r--src/models/index.ts2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/models/file-cache.ts b/src/models/file-cache.ts
new file mode 100644
index 0000000..4846ba3
--- /dev/null
+++ b/src/models/file-cache.ts
@@ -0,0 +1,14 @@
+import {Table, Column, PrimaryKey, Model} from 'sequelize-typescript';
+
+@Table
+export default class FileCache extends Model<FileCache> {
+ @PrimaryKey
+ @Column
+ hash!: string;
+
+ @Column
+ kbits!: number;
+
+ @Column
+ accessedAt!: Date;
+}
diff --git a/src/models/index.ts b/src/models/index.ts
index d39a3dc..e3f7c0a 100644
--- a/src/models/index.ts
+++ b/src/models/index.ts
@@ -1,8 +1,10 @@
+import FileCache from './file-cache.js';
import KeyValueCache from './key-value-cache.js';
import Settings from './settings.js';
import Shortcut from './shortcut.js';
export {
+ FileCache,
KeyValueCache,
Settings,
Shortcut,