DataObjects/Core_notify.php
authorAlan Knowles <alan@akbkhome.com>
Wed, 18 May 2011 04:20:52 +0000 (12:20 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 18 May 2011 04:20:52 +0000 (12:20 +0800)
DataObjects/Core_notify.php

index 4ab3b11..7ba4f6b 100644 (file)
@@ -1,24 +1,7 @@
 <?php
 /**
- *
- * Table is designed to be used with a mailer to notify or issue
- * emails (or maybe others later??)
- *
- *
-CREATE TABLE  core_notify  (
-  `id` int(11)  NOT NULL AUTO_INCREMENT,
-  `act_when` DATETIME NOT NULL,
-  `onid` int(11)  NOT NULL DEFAULT 0,
-  `ontable` varchar(128)  NOT NULL DEFAULT '',
-  `person_id` int(11)  NOT NULL DEFAULT 0,
-  `msgid` varchar(128)  NOT NULL  DEFAULT '',
-  `sent` DATETIME  NOT NULL,
-  `event_id` int(11)  NOT NULL DEFAULT 0,
-  PRIMARY KEY (`id`),
-  INDEX `lookup`(`act_when`, `msgid`)
-);
-*/
+ * Table Definition for core_notify
+ */
 require_once 'DB/DataObject.php';
 
 class Pman_Core_DataObjects_Core_notify extends DB_DataObject 
@@ -26,41 +9,17 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject
     ###START_AUTOCODE
     /* the code below is auto generated do not remove the above tag */
 
-    
-    public $__table = 'core_notify';         
-    public $act_when;                        
-    
-    public $ontable;                         
-    public $onid;                            
-    
-    public $person_id;                       
-    
-    public $msgid;   // message id after it has been sent. -- empty if not sent..
-    public $sent;    // date it was sent.?? or last effort..
-    public $bounced; // 1 - failed to send (??) // 2 = we got a bounce.
-
+    public $__table = 'core_notify';                     // table name
+    public $id;                              // int(11)  not_null primary_key auto_increment
+    public $act_when;                        // datetime(19)  not_null multiple_key binary
+    public $onid;                            // int(11)  not_null
+    public $ontable;                         // string(128)  not_null
+    public $person_id;                       // int(11)  not_null
+    public $msgid;                           // string(128)  not_null
+    public $sent;                            // datetime(19)  not_null binary
+    public $event_id;                        // int(11)  
 
-    function person()
-    {
-        $c = DB_DataObject::Factory('Person');
-        $c->get($this->person_id);
-        return $c;
-        
-    }
-    function object()
-    {
-        $c = DB_DataObject::factory($this->ontable);
-        $c->autoJoin();
-        if ($c->get($this->onid)) {
-            return $c;
-        }
-        return false;
-        
-    }
-    
-    function delivered()
-    {
-        return !empty($msgid);
-    }
     
-}
\ No newline at end of file
+    /* the code above is auto generated do not remove the tag below */
+    ###END_AUTOCODE
+}