<?php
namespace App\Model\Table;

use Cake\ORM\Table;
use Cake\Validation\Validator;
use Cake\ORM\TableRegistry;

class VideoTable extends Table
{

    public function initialize(array $config)
    {
        //LEFT JOIN location_proyect
        $this->hasMany('CrossVideoSubcategoria',[
            'foreignKey' => 'id_video']);
        $this->belongsTo('Users',[
            'foreignKey' => 'id_usuario']);
        $this->hasMany('CrossVideoSerie',[
            'foreignKey' => 'id_video']);
        $this->belongsTo('CatEstatusVideo',[
            'foreignKey' => 'id_estatus']);
    }

}

?>