PDF reading with python
This commit is contained in:
@ -7,10 +7,11 @@ use ProVM\Common\Alias\Model;
|
||||
* @property int $id
|
||||
* @property string $nombre
|
||||
* @property Categoria $categoria_id
|
||||
* @property TipoCuenta $tipo_id
|
||||
*/
|
||||
class Cuenta extends Model {
|
||||
public static $_table = 'cuentas';
|
||||
protected static $fields = ['nombre', 'categoria_id'];
|
||||
protected static $fields = ['nombre', 'categoria_id', 'tipo_id'];
|
||||
|
||||
protected $categoria;
|
||||
public function categoria() {
|
||||
@ -19,13 +20,12 @@ class Cuenta extends Model {
|
||||
}
|
||||
return $this->categoria;
|
||||
}
|
||||
|
||||
protected $entradas;
|
||||
public function entradas() {
|
||||
if ($this->entradas === null) {
|
||||
$this->entradas = $this->parentOf(Entrada::class, [Model::CHILD_KEY => 'cuenta_id']);
|
||||
protected $cuenta;
|
||||
public function cuenta() {
|
||||
if ($this->cuenta === null) {
|
||||
$this->cuenta = $this->childOf(TipoCuenta::class, [Model::SELF_KEY => 'tipo_id']);
|
||||
}
|
||||
return $this->entradas;
|
||||
return $this->cuenta;
|
||||
}
|
||||
|
||||
protected $cargos;
|
||||
|
Reference in New Issue
Block a user