diff options
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/cache.ts | 15 | ||||
| -rw-r--r-- | src/models/index.ts | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/models/cache.ts b/src/models/cache.ts new file mode 100644 index 0000000..ebf8dad --- /dev/null +++ b/src/models/cache.ts @@ -0,0 +1,15 @@ +import {Table, Column, PrimaryKey, Model} from 'sequelize-typescript'; +import sequelize from 'sequelize'; + +@Table +export default class Cache extends Model<Cache> { + @PrimaryKey + @Column + key!: string; + + @Column(sequelize.TEXT) + value!: string; + + @Column + expiresAt!: Date; +} diff --git a/src/models/index.ts b/src/models/index.ts index 2971df5..b0cd909 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,7 +1,9 @@ -import Settings from './settings'; -import Shortcut from './shortcut'; +import Cache from './cache.js'; +import Settings from './settings.js'; +import Shortcut from './shortcut.js'; export { + Cache, Settings, Shortcut }; |
