Initial commit
This commit is contained in:
19
app/models/http/Session.model.ts
Normal file
19
app/models/http/Session.model.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { SessionModel } from '../../../bundle/daton.ts'
|
||||
import { Field, Type } from '../../../bundle/daton_orm.ts'
|
||||
|
||||
export default class Session extends SessionModel {
|
||||
protected static table = 'sessions'
|
||||
protected static key = 'session_key'
|
||||
|
||||
protected static readonly CREATED_AT = 'start_time'
|
||||
protected static readonly UPDATED_AT = null // No updated at
|
||||
|
||||
@Field(Type.varchar)
|
||||
protected session_key!: string
|
||||
|
||||
@Field(Type.int)
|
||||
protected user_id?: number
|
||||
|
||||
@Field(Type.timestamp)
|
||||
protected start_time!: Date
|
||||
}
|
||||
Reference in New Issue
Block a user