Added Library Info
This commit is contained in:
41
application/classes/model/volhistory.php
Normal file
41
application/classes/model/volhistory.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
*
|
||||
* @package PTA
|
||||
* @subpackage Volume History
|
||||
* @category Models
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||
* @license http://phptsmadmin.sf.net/license.html
|
||||
*/
|
||||
class Model_VOLHISTORY extends ORMTSM {
|
||||
protected $_table_name = 'VOLHISTORY';
|
||||
protected $_primary_key = 'VOLUME_NAME';
|
||||
protected $_sorting = array(
|
||||
'DATE_TIME'=>'ASC',
|
||||
);
|
||||
|
||||
protected $_has_one = array(
|
||||
'VOLUME'=>array('foreign_key'=>'VOLUME_NAME','far_key'=>'VOLUME_NAME'),
|
||||
);
|
||||
protected $_has_many = array(
|
||||
);
|
||||
|
||||
protected $_display_filters = array(
|
||||
'DATE_TIME'=>array(
|
||||
array('ORMTSM::date',array(':value','d-M-Y')),
|
||||
),
|
||||
);
|
||||
|
||||
public function lastuse() {
|
||||
// We'll find the last record
|
||||
foreach ($this->order_by('DATE_TIME DESC')->find_all() as $r)
|
||||
return $r;
|
||||
}
|
||||
|
||||
public function backupid() {
|
||||
return sprintf('%s.%s.%s',$this->BACKUP_SERIES,$this->BACKUP_OPERATION,$this->VOLUME_SEQ);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user