You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import {Model} from '../model/Model'
|
|
|
|
import {Field} from '../model/Field'
|
|
|
|
import {FieldType} from '../types'
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Model used to fetch & store sessions from the ORMSession driver.
|
|
|
|
*/
|
|
|
|
export class SessionModel extends Model<SessionModel> {
|
|
|
|
protected static table = 'sessions' // FIXME allow configuring
|
|
|
|
|
|
|
|
protected static key = 'session_uuid'
|
|
|
|
|
|
|
|
protected static populateKeyOnInsert = true
|
|
|
|
|
|
|
|
@Field(FieldType.varchar, 'session_uuid')
|
|
|
|
public uuid!: string;
|
|
|
|
|
|
|
|
@Field(FieldType.json, 'session_data')
|
|
|
|
public json!: any;
|
|
|
|
}
|