blob: 44385726bd3667b7b3701e108557f2cdf1adc216 (
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
31
32
33
34
35
36
37
38
39
40
|
<?php
Prado::using('Application.model.Entry');
Prado::using('Application.model.Category');
class Calendar extends TActiveRecord {
const TABLE = 'calendars';
public $UID;
public $Url;
public $Name;
public $Website;
public $Visible;
public $LastUpdated;
public $CategoryID;
public static $COLUMN_MAPPING = [
'uid' => '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);
}
}
?>
|