<?php
namespace Incoviba\nuevo\Common;

use Incoviba\Common\Alias\NewModel;

/**
 * 
 * @author Aldarien
 * @property int id
 * @property string descripcion
 * @property Region region_id
 *
 */
class Provincia extends NewModel
{
	protected static $_table = 'provincias';
	
    //
    public function region()
    {
    	return $this->belongs_to(Region::class, 'region_id')->findOne();
    }
    public function comunas()
    {
    	return $this->has_many(Comuna::class, 'provincia_id')->findMany();
    }
}
