You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
979 B

2 months ago
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class dag_run extends Model
{
use HasFactory;
protected $fillable = [
'dag_id',
'run_id',
'airflow_id',
'status',
'execution_date',
'start_date',
'end_date',
'logs',
'queue',
];
/**
* Связь с Airflow кластером.
*/
public function airflow()
{
return $this->belongsTo(Airflow::class);
}
/**
* Связь с моделью DAG.
*/
public function dag()
{
return $this->belongsTo(dag::class);
}
/**
* Связь с TaskInstance.
*/
public function taskInstances()
{
return $this->hasMany(TaskInstance::class);
}
/**
* Связь с DAGEvent.
*/
public function events()
{
return $this->hasMany(dag_event::class);
}
}