git-svn-id: file:///svn-source/pmgr/branches/initial_20090526/site@24 97e9348a-65ac-dc4b-aefc-98561f571b83
44 lines
993 B
PHP
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' => ''
|
|
)
|
|
);
|
|
|
|
}
|
|
?>
|