cmc-sales/models/job.php
2011-03-14 11:21:56 +11:00

48 lines
1 KiB
PHP
Executable file

<?php
class Job extends AppModel {
var $name = 'Job';
var $validate = array(
'title' => array('notempty'),
'enquiry_id' => array('numeric'),
'date_order_received' => array('date'),
'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(
'Enquiry' => array(
'className' => 'Enquiry',
'foreignKey' => 'enquiry_id',
'conditions' => '',
'fields' => '',
'order' => '',
'counterCache' => true
),
'Currency'
);
var $hasAndBelongsToMany = array(
'PurchaseOrder' => array(
'className' => 'PurchaseOrder',
'joinTable' => 'jobs_purchase_orders',
'unique' => true
),
'Email' => array(
'className' => 'Email',
'joinTable' => 'emails_jobs',
)
);
}
?>