cmc-sales/models/shipment.php

105 lines
2.7 KiB
PHP
Raw Normal View History

<?php
class Shipment extends AppModel {
var $name = 'Shipment';
var $validate = array(
'freight_forwarder_id' => array('numeric'),
'airway_bill' => array('notempty')
);
var $recursive = 1;
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
'FreightForwarder' => array(
'className' => 'FreightForwarder',
'foreignKey' => 'freight_forwarder_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'FreightService' => array(
'className' => 'FreightService',
'foreignKey' => 'freight_service_id'
)
);
var $hasMany = array(
'Box' => array(
'className' => 'Box',
'foreignKey' => 'shipment_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'ShipmentInvoice' => array(
'className' => 'ShipmentInvoice',
'foreignKey' => 'shipment_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
var $hasAndBelongsToMany = array(
'Job' => array(
'className' => 'Job',
'joinTable' => 'shipments_jobs',
'foreignKey' => 'shipment_id',
'associationForeignKey' => 'job_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
'Principle' => array(
'className' => 'Principle',
'joinTable' => 'shipments_principles',
'foreignKey' => 'shipment_id',
'associationForeignKey' => 'principle_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
'PurchaseOrder' => array(
'className' => 'PurchaseOrder',
'joinTable' => 'shipments_purchase_orders',
'foreignKey' => 'shipment_id',
'associationForeignKey' => 'purchase_order_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
?>