2009-01-12 21:13:18 -08:00
|
|
|
<?php
|
|
|
|
|
class Principle extends AppModel {
|
|
|
|
|
|
2011-03-13 17:21:56 -07:00
|
|
|
var $name = 'Principle';
|
2009-01-12 21:13:18 -08:00
|
|
|
|
2011-03-13 17:21:56 -07:00
|
|
|
var $recursive = 0;
|
2011-03-09 23:18:26 -08:00
|
|
|
|
2011-04-21 00:38:01 -07:00
|
|
|
var $order = 'Principle.name ASC';
|
|
|
|
|
|
2011-03-13 17:21:56 -07:00
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
|
|
|
var $belongsTo = array(
|
|
|
|
|
'Country' => array('className' => 'Country',
|
|
|
|
|
'foreignKey' => 'country_id',
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => ''
|
|
|
|
|
),
|
|
|
|
|
'Currency' => array('className' => 'Currency',
|
|
|
|
|
'foreignKey' => 'currency_id',
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => ''
|
|
|
|
|
)
|
|
|
|
|
);
|
2009-01-12 21:13:18 -08:00
|
|
|
|
2011-03-13 17:21:56 -07:00
|
|
|
var $hasMany = array(
|
|
|
|
|
'Enquiry' => array('className' => 'Enquiry',
|
|
|
|
|
'foreignKey' => 'principle_id',
|
|
|
|
|
'dependent' => false,
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => '',
|
|
|
|
|
'limit' => '',
|
|
|
|
|
'offset' => '',
|
|
|
|
|
'exclusive' => '',
|
|
|
|
|
'finderQuery' => '',
|
|
|
|
|
'counterQuery' => ''
|
|
|
|
|
),
|
|
|
|
|
'Product' => array('className' => 'Product',
|
|
|
|
|
'foreignKey' => 'principle_id',
|
|
|
|
|
'dependent' => false,
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => '',
|
|
|
|
|
'limit' => '',
|
|
|
|
|
'offset' => '',
|
|
|
|
|
'exclusive' => '',
|
|
|
|
|
'finderQuery' => '',
|
|
|
|
|
'counterQuery' => ''
|
|
|
|
|
),
|
|
|
|
|
'PrincipleAddress' => array('className' => 'PrincipleAddress',
|
|
|
|
|
'foreignKey' => 'principle_id'
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
'PrincipleContact' => array('className' => 'Users',
|
|
|
|
|
'foreignKey' => 'principle_id'
|
|
|
|
|
),
|
|
|
|
|
);
|
2009-01-12 21:13:18 -08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
?>
|