Import other modules into monorepo
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
20
src/orm/support/CacheModel.ts
Normal file
20
src/orm/support/CacheModel.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {Model} from "../model/Model";
|
||||
import {Field} from "../model/Field";
|
||||
import {FieldType} from "../types";
|
||||
|
||||
/**
|
||||
* A model instance which stores records from the ORMCache driver.
|
||||
*/
|
||||
export class CacheModel extends Model<CacheModel> {
|
||||
protected static table = 'caches'; // FIXME allow configuring
|
||||
protected static key = 'cache_key';
|
||||
|
||||
@Field(FieldType.varchar, 'cache_key')
|
||||
public cacheKey!: string;
|
||||
|
||||
@Field(FieldType.text, 'cache_value')
|
||||
public cacheValue!: string;
|
||||
|
||||
@Field(FieldType.timestamp, 'cache_expires')
|
||||
public cacheExpires?: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user