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/Entry.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/php/model/Entry.php (limited to 'app/php/model/Entry.php') diff --git a/app/php/model/Entry.php b/app/php/model/Entry.php new file mode 100644 index 0000000..85d522f --- /dev/null +++ b/app/php/model/Entry.php @@ -0,0 +1,40 @@ + 'ID', + 'uid' => 'UID', + 'begin_date' => 'BeginDate', + 'end_date' => 'EndDate', + 'all_day' => 'AllDay', + 'name' => 'Name', + 'location' => 'Location', + '_calendar' => 'CalendarID' + ]; + + public static $RELATIONS = [ + 'Calendar' => [self::BELONGS_TO, 'Calendar', '_calendar'] + ]; + + public static function finder($className=__CLASS__) { + return parent::finder($className); + } + +} + +?> -- cgit v1.2.3