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.
31 lines
720 B
31 lines
720 B
import {Field, FieldType, HTTPMethod, Model} from '@extollo/lib'
|
|
|
|
export class PageView extends Model<PageView> {
|
|
protected static table = 'page_views'
|
|
protected static key = 'page_view_id'
|
|
|
|
@Field(FieldType.serial, 'page_view_id')
|
|
public pageViewId?: number
|
|
|
|
@Field(FieldType.timestamp, 'visited_at')
|
|
public visitedAt = new Date()
|
|
|
|
@Field(FieldType.varchar)
|
|
public hostname?: string
|
|
|
|
@Field(FieldType.varchar)
|
|
public ip?: string
|
|
|
|
@Field(FieldType.varchar)
|
|
public method: HTTPMethod = 'get'
|
|
|
|
@Field(FieldType.varchar)
|
|
public endpoint!: string
|
|
|
|
@Field(FieldType.bigint, 'user_id')
|
|
public userId?: number
|
|
|
|
@Field(FieldType.bool)
|
|
public xhr = false
|
|
}
|