summaryrefslogtreecommitdiff
path: root/app/frontend/model/Category.php
blob: 87b97b6c1fa238b5a6aae5188fbe081879a421f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

Prado::using('Application.db.ActiveRecord');
Prado::using('Application.model.Calendar');

class Category extends ActiveRecord {

    const TABLE = 'categories';

    public $ID;
    public $Name;
    public $Priority;

    public static $COLUMN_MAPPING = [
        'id' => 'ID',
        'name' => 'Name',
        'priority' => 'Priority'
    ];

    public static $RELATIONS = [
        'Calendars' => [self::HAS_MANY, 'Calendar', '_category']
    ];

    public static function finder($className=__CLASS__) {
        return parent::finder($className);
    }

}

?>