init
[Pman.Core] / DataObjects / Office.php
1 <?php
2 /**
3  * Table Definition for Office
4  */
5 require_once 'DB/DataObject.php';
6
7 class Pman_Core_DataObjects_Office extends DB_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'Office';                          // table name
13     public $id;                              // int(11)  not_null primary_key auto_increment
14     public $company_id;                      // int(11)  not_null
15     public $name;                            // string(64)  not_null
16     public $address;                         // blob(65535)  not_null blob
17     public $phone;                           // string(32)  not_null
18     public $fax;                             // string(32)  not_null
19     public $email;                           // string(128)  not_null
20     public $role;                            // string(32)  not_null
21
22      
23     /* the code above is auto generated do not remove the tag below */
24     ###END_AUTOCODE
25     function toEventString() {
26         return $this->name;
27     }
28     /**
29      * check who is trying to access this. false == access denied..
30      */
31     function checkPerm($lvl, $au) 
32     {
33         return $au->hasPerm("Core.Offices", $lvl);    
34     } 
35 }