Sort of working beta
This commit is contained in:
@ -7,6 +7,22 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Job extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\JobFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"is_active",
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
"is_active" => "boolean",
|
||||
];
|
||||
|
||||
public function jobInfos()
|
||||
{
|
||||
return $this->hasMany(JobInfo::class)->with("jobInfoType")->orderBy("created_at");
|
||||
}
|
||||
|
||||
public function jobRuns()
|
||||
{
|
||||
return $this->hasMany(JobRun::class)->orderBy("created_at");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user