job status for database

This commit is contained in:
2019-05-05 01:51:21 -05:00
parent a0c4c619b0
commit 4b2a1758e2
8 changed files with 53 additions and 37 deletions
-29
View File
@@ -1,29 +0,0 @@
<?php
namespace App\Models\Jobs;
use Illuminate\Database\Eloquent\Model;
class JobError extends Model
{
//Table Name
public $table = 'job_statuses';
//Timestamps
public $timestaps = true;
/**
* The attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'job_id',
'job_name',
'error',
];
public function JobStatus() {
$this->belongsTo('\App\Models\Jobs\JobStatus');
}
}
-5
View File
@@ -18,12 +18,7 @@ class JobStatus extends Model
* @var array
*/
protected $fillable = [
'id',
'job_name',
'complete',
];
public function Error() {
$this->hasOne('\App\Models\Jobs\JobError', 'job_id', 'id');
}
}