diff options
author | emkael <emkael@tlen.pl> | 2016-03-15 22:06:47 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-03-15 22:06:47 +0100 |
commit | cc09e963e8ef7ea093c7b13096856e5c732cd776 (patch) | |
tree | 9da36344800f23ed05b00df914e2b9c71e86ccee /app/php/model/Calendar.php | |
parent | 6dcabb240f0ff0ee1654ac66f806bedb22495d23 (diff) |
* extending TActiveRecord so it's capable of fetching mapped column fields from sql maps
Diffstat (limited to 'app/php/model/Calendar.php')
-rw-r--r-- | app/php/model/Calendar.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/php/model/Calendar.php b/app/php/model/Calendar.php index 4438572..9e1afce 100644 --- a/app/php/model/Calendar.php +++ b/app/php/model/Calendar.php @@ -1,12 +1,13 @@ <?php +Prado::using('Application.db.ActiveRecord'); Prado::using('Application.model.Entry'); Prado::using('Application.model.Category'); -class Calendar extends TActiveRecord { +class Calendar extends ActiveRecord { const TABLE = 'calendars'; - + public $UID; public $Url; public $Name; @@ -23,18 +24,18 @@ class Calendar extends TActiveRecord { 'website' => 'Website', 'visible' => 'Visible', 'last_updated' => 'LastUpdated', - '_category' => 'CategoryID' + '_category' => 'CategoryID' ]; public static $RELATIONS = [ 'Entries' => [self::HAS_MANY, 'Entry', '_calendar'], 'Category' => [self::BELONGS_TO, 'Category', '_category'] ]; - + public static function finder($className=__CLASS__) { return parent::finder($className); } - + } ?> |