summaryrefslogtreecommitdiff
path: root/app/frontend/model/UserAuthKey.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/frontend/model/UserAuthKey.php')
-rw-r--r--app/frontend/model/UserAuthKey.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/frontend/model/UserAuthKey.php b/app/frontend/model/UserAuthKey.php
new file mode 100644
index 0000000..64d9e65
--- /dev/null
+++ b/app/frontend/model/UserAuthKey.php
@@ -0,0 +1,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);
+ }
+
+}
+
+?>