2013-05-02 06:41:59 +08:00
|
|
|
<?php
|
|
|
|
class Monitor extends AppModel {
|
|
|
|
public $useTable = 'Monitors';
|
2013-05-06 22:36:47 +08:00
|
|
|
public $primaryKey = 'Id';
|
2013-05-02 20:55:59 +08:00
|
|
|
public $hasMany = array(
|
|
|
|
'Event' => array(
|
|
|
|
'className' => 'Event',
|
2013-05-05 10:41:27 +08:00
|
|
|
'foreignKey' => 'MonitorId',
|
|
|
|
'fields' => 'Event.Id'
|
2013-05-02 21:01:27 +08:00
|
|
|
),
|
|
|
|
'Zone' => array(
|
|
|
|
'className' => 'Zone',
|
2013-05-05 10:41:27 +08:00
|
|
|
'foreignKey' => 'MonitorId',
|
|
|
|
'fields' => 'Zone.Id'
|
2013-05-02 20:55:59 +08:00
|
|
|
)
|
|
|
|
);
|
2013-05-02 06:41:59 +08:00
|
|
|
}
|
|
|
|
?>
|