Added more models
git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@24 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
34
site/models/site_area.php
Normal file
34
site/models/site_area.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
class SiteArea extends AppModel {
|
||||
|
||||
var $name = 'SiteArea';
|
||||
var $validate = array(
|
||||
'id' => array('numeric'),
|
||||
'site_id' => array('numeric'),
|
||||
'name' => array('notempty')
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
var $belongsTo = array(
|
||||
'Site' => array(
|
||||
'className' => 'Site',
|
||||
'foreignKey' => 'site_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
|
||||
var $hasOne = array(
|
||||
'Map' => array(
|
||||
'className' => 'Map',
|
||||
'foreignKey' => 'site_area_id',
|
||||
'dependent' => false,
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user