2010-05-03 23:49:57 -07:00
|
|
|
<?php
|
|
|
|
|
class Job extends AppModel {
|
|
|
|
|
|
|
|
|
|
var $name = 'Job';
|
|
|
|
|
var $validate = array(
|
|
|
|
|
'title' => array('notempty'),
|
2010-05-13 00:10:10 -07:00
|
|
|
|
2010-05-03 23:49:57 -07:00
|
|
|
'enquiry_id' => array('numeric'),
|
2010-05-13 00:10:10 -07:00
|
|
|
|
2010-05-03 23:49:57 -07:00
|
|
|
'date_order_received' => array('date'),
|
2010-05-17 23:45:38 -07:00
|
|
|
|
2010-05-03 23:49:57 -07:00
|
|
|
'domestic_freight_paid_by' => array('notempty'),
|
|
|
|
|
'sale_category' => array('notempty'),
|
|
|
|
|
'shipment_category' => array('notempty')
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
|
|
|
var $belongsTo = array(
|
2010-05-13 00:10:10 -07:00
|
|
|
|
2010-05-03 23:49:57 -07:00
|
|
|
'Enquiry' => array(
|
|
|
|
|
'className' => 'Enquiry',
|
|
|
|
|
'foreignKey' => 'enquiry_id',
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => '',
|
|
|
|
|
'counterCache' => true
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/*var $hasMany = array(
|
|
|
|
|
'JobProduct' => array(
|
|
|
|
|
'className' => 'JobProduct',
|
|
|
|
|
'foreignKey' => 'job_id',
|
|
|
|
|
'dependent' => false,
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => '',
|
|
|
|
|
'limit' => '',
|
|
|
|
|
'offset' => '',
|
|
|
|
|
'exclusive' => '',
|
|
|
|
|
'finderQuery' => '',
|
|
|
|
|
'counterQuery' => ''
|
|
|
|
|
)
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
?>
|