summaryrefslogtreecommitdiff
path: root/app/frontend/model/UserAuthKey.php
blob: 64d9e65f335d1b84ae2b43d476fc18168ff97900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

Prado::using('Application.db.ActiveRecord');
Prado::using('Application.model.User');

class UserAuthKey extends ActiveRecord {

    const TABLE = 'user_auth_keys';

    public $ID;
    public $AuthKey;
    public $IPAddress;

    public $UserID;

    public static $COLUMN_MAPPING = [
        'id' => 'ID',
        'auth_key' => 'AuthKey',
        'ip_address' => 'IPAddress',
        '_user' => 'UserID'
    ];

    public static $RELATIONS = [
        'User' => [self::BELONGS_TO, 'User', '_user']
    ];

    public static function finder($className=__CLASS__) {
        return parent::finder($className);
    }

}

?>