Added more models

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@24 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-28 09:27:29 +00:00
parent 7433e6868c
commit aed2c6912c
8 changed files with 285 additions and 0 deletions

34
site/models/site_area.php Normal file
View 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' => ''
)
);
}
?>