Very, very early snapshot. Some models are working, and I have a controller for testing. Everything is subject to change. I _do_ have a working tenant ledger though, so it's worth a snapshot.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@15 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-28 05:49:03 +00:00
parent f4007a0269
commit df846f9963
13 changed files with 600 additions and 0 deletions

46
site/models/contact.php Normal file
View File

@@ -0,0 +1,46 @@
<?php
class Contact extends AppModel {
var $name = 'Contact';
var $validate = array(
'id' => array('numeric'),
'display_name' => array('notempty'),
'id_federal' => array('ssn'),
'id_exp' => array('date')
);
var $hasAndBelongsToMany = array(
'Lease' => array(
'className' => 'Lease',
'joinTable' => 'contacts_leases',
'foreignKey' => 'contact_id',
'associationForeignKey' => 'lease_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
'ContactEmail' => array(
'className' => 'ContactEmail',
'joinTable' => 'contacts_methods',
'foreignKey' => 'contact_id',
'associationForeignKey' => 'method_id',
'unique' => true,
'conditions' => "ContactsMethod.method = 'EMAIL'",
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
?>