2011-06-28 00:13:31 +00:00
|
|
|
<?php
|
2009-07-06 01:25:53 +00:00
|
|
|
class Industry extends AppModel {
|
|
|
|
|
|
|
|
|
|
var $name = 'Industry';
|
2009-11-04 06:12:12 +00:00
|
|
|
|
2009-07-06 01:25:53 +00:00
|
|
|
var $hasAndBelongsToMany = array (
|
|
|
|
|
'Customer' => array(
|
|
|
|
|
'className' => 'Customer',
|
2009-07-16 05:51:40 +00:00
|
|
|
'joinTable' => 'industries_customers'
|
|
|
|
|
)
|
2009-07-06 01:25:53 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $belongsTo = array (
|
|
|
|
|
'ParentIndustry' => array(
|
|
|
|
|
'className' => 'Industries',
|
|
|
|
|
'foreignKey' => 'parent_id'
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
var $hasMany = array (
|
|
|
|
|
'subIndustry' => array(
|
|
|
|
|
'className' => 'Industries',
|
|
|
|
|
'foreignKey' => 'parent_id',
|
|
|
|
|
'dependent' => true
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
2009-07-16 05:51:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-06 01:25:53 +00:00
|
|
|
}
|
|
|
|
|
|
2009-11-04 06:12:12 +00:00
|
|
|
?>
|