git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@15 97e9348a-65ac-dc4b-aefc-98561f571b83
46 lines
1010 B
PHP
46 lines
1010 B
PHP
<?php
|
|
class Receipt extends AppModel {
|
|
|
|
var $name = 'Receipt';
|
|
var $validate = array(
|
|
'id' => array('numeric'),
|
|
'stamp' => array('time')
|
|
);
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
var $hasMany = array(
|
|
'Payment' => array(
|
|
'className' => 'Payment',
|
|
'foreignKey' => 'receipt_id',
|
|
'dependent' => false,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'exclusive' => '',
|
|
'finderQuery' => '',
|
|
'counterQuery' => ''
|
|
)
|
|
);
|
|
|
|
var $hasAndBelongsToMany = array(
|
|
'Charge' => array(
|
|
'className' => 'Charge',
|
|
'joinTable' => 'charges_receipts',
|
|
'foreignKey' => 'receipt_id',
|
|
'associationForeignKey' => 'charge_id',
|
|
'unique' => true,
|
|
'conditions' => '',
|
|
'fields' => '',
|
|
'order' => '',
|
|
'limit' => '',
|
|
'offset' => '',
|
|
'finderQuery' => '',
|
|
'deleteQuery' => '',
|
|
'insertQuery' => ''
|
|
)
|
|
);
|
|
|
|
}
|
|
?>
|