41 lines
917 B
PHP
Executable file
41 lines
917 B
PHP
Executable file
<?php
|
|
class ProductOptionsCategory extends AppModel {
|
|
|
|
var $name = 'ProductOptionsCategory';
|
|
var $validate = array(
|
|
'product_id' => array('numeric'),
|
|
'name' => array('notempty'),
|
|
'location' => array('numeric' => array('allowEmpty' => true)),
|
|
'exclusive' => array('boolean')
|
|
);
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
var $belongsTo = array(
|
|
'Product' => array(
|
|
'className' => 'Product',
|
|
'foreignKey' => 'product_id',
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => ''
|
|
)
|
|
);
|
|
|
|
var $hasMany = array(
|
|
'ProductOption' => array(
|
|
'className' => 'ProductOption',
|
|
'foreignKey' => 'product_options_category_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
)
|
|
);
|
|
|
|
}
|
|
?>
|