cmc-sales/models/job.php

64 lines
1.3 KiB
PHP
Raw Normal View History

<?php
class Job extends AppModel {
2010-07-07 23:25:55 -07:00
var $name = 'Job';
2010-07-07 23:25:55 -07:00
var $validate = array(
'title' => array('notempty'),
2010-07-07 23:25:55 -07:00
'enquiry_id' => array('numeric'),
2010-07-07 23:25:55 -07:00
/* 'date_order_received' => array('date'),
2010-07-07 23:25:55 -07:00
'domestic_freight_paid_by' => array('notempty'),
'sale_category' => array('notempty'),
'shipment_category' => array('notempty') */
2010-07-07 23:25:55 -07:00
);
2010-07-07 23:25:55 -07:00
//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' => array(
'className' => 'Currency',
'foreignKey' => 'currency_id'
),
'Customer' => array(
'className' => 'Customer',
'foreignKey' => 'customer_id'
)
2010-07-07 23:25:55 -07:00
);
var $hasAndBelongsToMany = array(
'PurchaseOrder' => array(
'className' => 'PurchaseOrder',
'joinTable' => 'jobs_purchase_orders',
'unique' => true
),
'Email' => array(
'className' => 'Email',
'joinTable' => 'emails_jobs',
2011-05-08 18:11:23 -07:00
),
'Shipment' => array(
'className' => 'Shipment',
'joinTable' => 'shipments_jobs',
)
);
}
?>