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
41
42
43
44
45
46
47
|
<?php
Prado::using('Application.db.ActiveRecord');
Prado::using('Application.model.Entry');
Prado::using('Application.model.Category');
class Calendar extends ActiveRecord {
const TABLE = 'calendars';
public $UID;
public $Url;
public $Name;
public $Website;
public $Visible;
public $CustomName;
public $CustomImage;
public $CustomUrl;
public $LastUpdated;
public $CategoryID;
public static $COLUMN_MAPPING = [
'uid' => 'UID',
'url' => 'Url',
'name' => 'Name',
'website' => 'Website',
'visible' => 'Visible',
'last_updated' => 'LastUpdated',
'custom_name' => 'CustomName',
'custom_image' => 'CustomImage',
'custom_url' => 'CustomUrl',
'_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);
}
}
?>
|