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/Category.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/php/model/Category.php (limited to 'app/php/model/Category.php') diff --git a/app/php/model/Category.php b/app/php/model/Category.php new file mode 100644 index 0000000..03a368a --- /dev/null +++ b/app/php/model/Category.php @@ -0,0 +1,27 @@ + 'ID', + 'name' => 'Name' + ]; + + public static $RELATIONS = [ + 'Calendars' => [self::HAS_MANY, 'Calendar', '_category'] + ]; + + public static function finder($className=__CLASS__) { + return parent::finder($className); + } + +} + +?> -- cgit v1.2.3