Files
lib/src/orm/support/SessionModel.ts

21 lines
544 B
TypeScript
Raw Normal View History

2021-06-02 22:36:25 -05:00
import {Model} from '../model/Model'
import {Field} from '../model/Field'
import {FieldType} from '../types'
2021-06-01 20:59:40 -05:00
/**
* Model used to fetch & store sessions from the ORMSession driver.
*/
export class SessionModel extends Model<SessionModel> {
protected static table = 'sessions' // FIXME allow configuring
2021-06-02 22:36:25 -05:00
protected static key = 'session_uuid'
protected static populateKeyOnInsert = true
2021-06-01 20:59:40 -05:00
@Field(FieldType.varchar, 'session_uuid')
public uuid!: string;
@Field(FieldType.json, 'session_data')
public json!: any;
}