From 0f69294121ee68616961af02bcfc0c7662cd3ba5 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 26 Feb 2016 14:59:53 +0100 Subject: * ActiveRecords model --- app/php/model/Calendar.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/php/model/Calendar.php (limited to 'app/php/model/Calendar.php') diff --git a/app/php/model/Calendar.php b/app/php/model/Calendar.php new file mode 100644 index 0000000..4438572 --- /dev/null +++ b/app/php/model/Calendar.php @@ -0,0 +1,40 @@ + 'UID', + 'url' => 'Url', + 'name' => 'Name', + 'website' => 'Website', + 'visible' => 'Visible', + 'last_updated' => 'LastUpdated', + '_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); + } + +} + +?> -- cgit v1.2.3