Update models to have more relationships and timestamp column definitions.
This commit is contained in:
committed by
Paula Quispe
parent
9aec728509
commit
426c2f6f39
@@ -14,9 +14,9 @@ class Process extends Model
|
||||
{
|
||||
// Set our table name
|
||||
protected $table = 'PROCESS';
|
||||
// We do have a created at, but we don't store an updated at
|
||||
// Our custom timestamp columns
|
||||
const CREATED_AT = 'PRO_CREATE_DATE';
|
||||
const UPDATED_AT = null;
|
||||
const UPDATED_AT = 'PRO_UPDATE_DATE';
|
||||
|
||||
/**
|
||||
* Retrieve all applications that belong to this process
|
||||
@@ -26,4 +26,9 @@ class Process extends Model
|
||||
return $this->hasMany(Application::class, 'PRO_ID', 'PRO_ID');
|
||||
|
||||
}
|
||||
|
||||
public function creator()
|
||||
{
|
||||
return $this->hasOne(User::class, 'PRO_CREATE_USER', 'USR_UID');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user