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.
25 lines
672 B
25 lines
672 B
import { Model, Type, Field, Relation } from '../../bundle/daton_orm.ts'
|
|
import User from "./User.model.ts";
|
|
|
|
export default class LoginAttempt extends Model<LoginAttempt> {
|
|
protected static table = 'daton_login_attempts'
|
|
protected static key = 'daton_login_attempt_id'
|
|
|
|
protected static readonly CREATED_AT = 'attempt_date'
|
|
protected static readonly UPDATED_AT = null
|
|
|
|
@Field(Type.int)
|
|
protected daton_login_attempt_id?: number
|
|
|
|
@Field(Type.int)
|
|
protected user_id!: number
|
|
|
|
@Field(Type.timestamp)
|
|
protected attempt_date!: Date
|
|
|
|
@Relation()
|
|
public user() {
|
|
return this.belongs_to_one(User, 'login_attempts')
|
|
}
|
|
}
|