First commit for filter by category

This commit is contained in:
Julio Cesar Laura Avendaño
2019-05-02 12:46:53 -04:00
committed by Paula Quispe
parent 7b96da5bc5
commit a874ab2390
4 changed files with 61 additions and 3 deletions

View File

@@ -24,18 +24,21 @@ class Process extends Model
public function applications()
{
return $this->hasMany(Application::class, 'PRO_ID', 'PRO_ID');
}
public function tasks()
{
return $this->hasMany(Task::class, 'PRO_UID', 'PRO_UID');
}
public function creator()
{
return $this->hasOne(User::class, 'PRO_CREATE_USER', 'USR_UID');
}
}
public function category()
{
return $this->hasOne(ProcessCategory::class, 'PRO_CATEGORY', 'CATEGORY_UID');
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace ProcessMaker\Model;
use Illuminate\Database\Eloquent\Model;
/**
* Class ProcessCategory
* @package ProcessMaker\Model
*
* Represents a process category object in the system.
*/
class ProcessCategory extends Model
{
// Set our table name
protected $table = 'PROCESS_CATEGORY';
}