1 <?php // vim: set binary noeol et sts=4 sw=4 :
4 require_once 'DB/DataObject.php';
6 class T_DBO_Entrega extends DB_DataObject
8 var $_database = 'taller';
9 var $__table = 'entrega';
20 function staticGet($k, $v = NULL)
22 return DB_DataObject::staticGet('T_DBO_Entrega', $k, $v);
25 // now define your table structure.
26 // key is column name, value is type
30 'id' => DB_DATAOBJECT_INT,
31 'curso_id' => DB_DATAOBJECT_INT,
32 'nro_ejercicio' => DB_DATAOBJECT_INT,
33 'entrega' => DB_DATAOBJECT_INT,
34 'ejercicio_id' => DB_DATAOBJECT_INT,
35 'desde' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME,
36 'hasta' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME,
37 'finalizada' => DB_DATAOBJECT_INT + DB_DATAOBJECT_BOOL,
41 // now define the keys.
47 function getFrom($curso_id, $ejercicio, $entrega)
49 $this->curso_id = $curso_id;
50 $this->nro_ejercicio = $ejercicio;
51 $this->entrega = $entrega;
52 return $this->find(true);