summaryrefslogtreecommitdiff
path: root/app/php/model/Category.php
blob: 03a368ab8a8dc4a23950e01e4885e6f185fc613f (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
<?php

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

class Category extends TActiveRecord {

    const TABLE = 'categories';

    public $ID;
    public $Name;

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

    public static $RELATIONS = [
        'Calendars' => [self::HAS_MANY, 'Calendar', '_category']
    ];
    
    public static function finder($className=__CLASS__) {
        return parent::finder($className);
    }
    
}

?>