API 1.0.0-rc

This commit is contained in:
2021-07-27 22:29:56 -04:00
parent c2d7729e71
commit 6172da2f95
33 changed files with 1013 additions and 0 deletions

21
api/src/Categoria.php Normal file
View File

@ -0,0 +1,21 @@
<?php
namespace Contabilidad;
use ProVM\Common\Alias\Model;
/**
* @property int $id
* @property string $nombre
*/
class Categoria extends Model {
public static $_table = 'categorias';
protected static $fields = ['nombre'];
protected $cuentas;
public function cuentas() {
if ($this->cuentas === null) {
$this->cuentas = $this->parentOf(Cuenta::class, [Model::CHILD_KEY => 'categoria_id']);
}
return $this->cuentas;
}
}