This commit is contained in:
2021-11-30 18:04:41 -03:00
parent 87323b22d8
commit f589ff960b
56 changed files with 1960 additions and 0 deletions

31
src/Venta/Propietario.php Normal file
View File

@ -0,0 +1,31 @@
<?php
namespace Incoviba\Venta;
use Incoviba\API\Common\Alias\Model;
use Incoviba\Common\Direccion;
class Propietario extends Model {
public static $_table = 'propietario';
public static $_id_column = ['rut'];
protected $direccion_o;
public function direccion() {
if ($this->direccion_o === null) {
$this->direccion_o = $this->childOf(Direccion::class, [Model::SELF_KEY => 'direccion']);
}
return $this->direccion_o;
}
public function nombreCompleto() {
return implode(' ', [
$this->nombres,
$this->apellidos()
]);
}
public function apellidos() {
return implode(' ', [
$this->apellido_paterno,
$this->apellido_materno
]);
}
}