2009-07-05 18:25:53 -07:00
|
|
|
<?
|
|
|
|
|
|
|
|
|
|
class Industry extends AppModel {
|
|
|
|
|
|
|
|
|
|
var $name = 'Industry';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $hasAndBelongsToMany = array (
|
|
|
|
|
'Customer' => array(
|
|
|
|
|
'className' => 'Customer',
|
2009-07-06 19:11:10 -07:00
|
|
|
'joinTable' => 'industries_customers',
|
|
|
|
|
'unique' => false
|
|
|
|
|
)
|
2009-07-05 18:25:53 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $belongsTo = array (
|
|
|
|
|
'ParentIndustry' => array(
|
|
|
|
|
'className' => 'Industries',
|
|
|
|
|
'foreignKey' => 'parent_id'
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
var $hasMany = array (
|
|
|
|
|
'subIndustry' => array(
|
|
|
|
|
'className' => 'Industries',
|
|
|
|
|
'foreignKey' => 'parent_id',
|
|
|
|
|
'dependent' => true
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|