Files
luos/workflow/engine/src/ProcessMaker/Model/Process.php

41 lines
830 B
PHP
Raw Normal View History

2017-12-04 13:25:35 +00:00
<?php
namespace ProcessMaker\Model;
use Illuminate\Database\Eloquent\Model;
/**
* Class Process
* @package ProcessMaker\Model
*
* Represents a business process object in the system.
*/
class Process extends Model
{
// Set our table name
protected $table = 'PROCESS';
// Our custom timestamp columns
2017-12-04 13:25:35 +00:00
const CREATED_AT = 'PRO_CREATE_DATE';
const UPDATED_AT = 'PRO_UPDATE_DATE';
/**
* Retrieve all applications that belong to this process
*/
public function applications()
{
return $this->hasMany(Application::class, 'PRO_ID', 'PRO_ID');
2017-12-04 13:25:35 +00:00
}
2019-04-25 21:15:43 -04:00
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');
}
2017-12-04 13:25:35 +00:00
}