DataObjects/Core_notify.php
[Pman.Core] / DataObjects / Core_notify.php
1 <?php
2 /**
3  * Table Definition for core_notify
4  */
5 require_once 'DB/DataObject.php';
6
7 class Pman_Core_DataObjects_Core_notify extends DB_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'core_notify';                     // table name
13     public $id;                              // int(11)  not_null primary_key auto_increment
14     public $act_when;                        // datetime(19)  not_null multiple_key binary
15     public $onid;                            // int(11)  not_null
16     public $ontable;                         // string(128)  not_null
17     public $person_id;                       // int(11)  not_null
18     public $msgid;                           // string(128)  not_null
19     public $sent;                            // datetime(19)  not_null binary
20     public $event_id;                        // int(11)  
21
22     
23     /* the code above is auto generated do not remove the tag below */
24     ###END_AUTOCODE
25     
26     function person()
27     {
28         $c = DB_DataObject::Factory('Person');
29         $c->get($this->person_id);
30         return $c;
31         
32     }
33     function object()
34     {
35         $c = DB_DataObject::factory($this->ontable);
36         $c->autoJoin();
37         if ($c->get($this->onid)) {
38             return $c;
39         }
40         return false;
41         
42     }
43     
44     function delivered()
45     {
46         return !empty($msgid);
47     }
48     
49 }
50 }