git-svn-id: file:///svn-source/pmgr/branches/initial_20090526/site@24 97e9348a-65ac-dc4b-aefc-98561f571b83
44 lines
986 B
PHP
44 lines
986 B
PHP
<?php
|
|
class UnitSize extends AppModel {
|
|
|
|
var $name = 'UnitSize';
|
|
var $validate = array(
|
|
'id' => array('numeric'),
|
|
'unit_type_id' => array('numeric'),
|
|
'code' => array('notempty'),
|
|
'name' => array('notempty'),
|
|
'width' => array('numeric'),
|
|
'depth' => array('numeric'),
|
|
'deposit' => array('money'),
|
|
'amount' => array('money')
|
|
);
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
var $belongsTo = array(
|
|
'UnitType' => array(
|
|
'className' => 'UnitType',
|
|
'foreignKey' => 'unit_type_id',
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => ''
|
|
)
|
|
);
|
|
|
|
var $hasMany = array(
|
|
'Unit' => array(
|
|
'className' => 'Unit',
|
|
'foreignKey' => 'unit_size_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
)
|
|
);
|
|
|
|
}
|
|
?>
|