Files
pmgr/site/models/map.php
abijah aed2c6912c Added more models
git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@24 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-05-28 09:27:29 +00:00

44 lines
993 B
PHP

<?php
class Map extends AppModel {
var $name = 'Map';
var $validate = array(
'id' => array('numeric'),
'site_id' => array('numeric'),
'site_area_id' => array('numeric'),
'name' => array('notempty'),
'width' => array('numeric'),
'depth' => array('numeric')
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
'SiteArea' => array(
'className' => 'SiteArea',
'foreignKey' => 'site_area_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
var $hasAndBelongsToMany = array(
'Unit' => array(
'className' => 'Unit',
'joinTable' => 'maps_units',
'foreignKey' => 'map_id',
'associationForeignKey' => 'unit_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
?>