Esempio n. 1
0
    public function __construct()
    {
        $this->db = DB::DEF;
        $this->primaryKey = 'fldModJackAlertID';
        $this->keyFormat = 'AL0000000';
        $this->tableName = 'tblModJackAlert';
        $this->tableStructure = <<<SQL
            CREATE TABLE {$this->tableName} (
              {$this->primaryKey} char(11) NOT NULL,
              fldErrorID char(11) NOT NULL,
              fldType char(6) NOT NULL,
              fldProcess varchar(50) NOT NULL,
              fldDescription varchar(200) NOT NULL,
              fldStatus char(6) NOT NULL DEFAULT 'new',
              fldTimeStamp datetime NOT NULL DEFAULT current_timestamp,
              PRIMARY KEY ({$this->primaryKey})
            );
SQL;
        /* This is the mapping between the object names and the column names
         * Please note that you can access data as different names
         */
        $this->orm = [0 => $this->primaryKey, 1 => 'fldErrorID', 2 => 'fldType', 3 => 'fldProcess', 4 => 'fldDescription', 5 => 'fldStatus', 'id' => $this->primaryKey, 'errorID' => 'fldErrorID', 'error_id' => 'fldErrorID', 'type' => 'fldType', 'process' => 'fldProcess', 'desc' => 'fldDescription', 'description' => 'fldDescription', 'status' => 'fldStatus'];
        $this->titles = [$this->primaryKey => 'ID'];
        parent::__construct();
    }
Esempio n. 2
0
    /**
     * @return void
     */
    public function __construct()
    {
        $this->db = 'local';
        $this->primaryKey = 'fldSchedulerID';
        $this->tableName = 'tblScheduler';
        $this->tableStructure = <<<SQL
            CREATE TABLE IF NOT EXISTS {$this->tableName} (
              {$this->primaryKey} varchar(11)    NOT NULL default '',
              fldCommand varchar(255) NOT NULL DEFAULT '',
              fldActive enum('Yes','No') NOT NULL DEFAULT 'Yes',
              fldStartTime varchar(40) NOT NULL DEFAULT '',
              fldCron varchar(100) NOT NULL DEFAULT '',
              fldLastRun varchar(40) NOT NULL DEFAULT '',
              PRIMARY KEY ({$this->primaryKey})
            )
SQL;
        $this->orm = ['command' => 'fldCommand', 'cmd' => 'fldCommand', 'active' => 'fldActive', 'start' => 'fldStartTime', 'cron' => 'fldCron', 'lastRun' => 'fldLastRun'];
        parent::__construct();
    }
Esempio n. 3
0
    /**
     * @return void
     */
    public function __construct()
    {
        $this->db = 'local';
        $this->primaryKey = 'fldCronQueueID';
        $this->tableName = 'tblCronQueue';
        $this->keyFormat = 'CQ0000000';
        $this->tableStructure = <<<SQL
            CREATE TABLE IF NOT EXISTS {$this->tableName} (
              {$this->primaryKey} varchar(11)    NOT NULL default '',
              fldRef varchar(11) NOT NULL DEFAULT '0',
              fldCommand varchar(255) NOT NULL DEFAULT '',
              fldPriority char(3) NOT NULL DEFAULT '0',
              fldStatus enum('NEW','RUNNING','COMPLETE') NOT NULL DEFAULT 'NEW',
              fldRunTime varchar(30) DEFAULT NULL,
              fldReturnValue char(3) DEFAULT NULL,
              fldReturnOutput varchar(255) DEFAULT NULL,
              PRIMARY KEY ({$this->primaryKey})
            )
SQL;
        $this->orm = ['ref' => 'fldref', 'command' => 'fldCommand', 'cmd' => 'fldCommand', 'priority' => 'fldPriority', 'status' => 'fldStatus', 'runTime' => 'fldRunTime', 'result' => 'fldReturnValue', 'message' => 'fldReturnOutput'];
        parent::__construct();
    }