git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@71 97e9348a-65ac-dc4b-aefc-98561f571b83
58 lines
1.2 KiB
PHP
58 lines
1.2 KiB
PHP
<?php
|
|
class Customer extends AppModel {
|
|
|
|
var $name = 'Customer';
|
|
var $validate = array(
|
|
'id' => array('numeric'),
|
|
'name' => array('notempty'),
|
|
);
|
|
|
|
var $hasMany = array(
|
|
'Lease' => array(
|
|
'className' => 'Lease',
|
|
'foreignKey' => 'customer_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
),
|
|
'Transaction' => array(
|
|
'className' => 'Transaction',
|
|
'foreignKey' => 'customer_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
)
|
|
);
|
|
|
|
var $hasAndBelongsToMany = array(
|
|
'Contact' => array(
|
|
'className' => 'Contact',
|
|
'joinTable' => 'contacts_customers',
|
|
'foreignKey' => 'customer_id',
|
|
'associationForeignKey' => 'contact_id',
|
|
'unique' => true,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'finderQuery' => '',
|
|
'deleteQuery' => '',
|
|
'insertQuery' => ''
|
|
),
|
|
);
|
|
|
|
}
|
|
?>
|