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.
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class airflow extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'name',
|
|
|
|
|
'url',
|
|
|
|
|
'username',
|
|
|
|
|
'password',
|
|
|
|
|
'api_token',
|
|
|
|
|
'port',
|
|
|
|
|
'version',
|
|
|
|
|
'is_active',
|
|
|
|
|
'user_id',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Связь с пользователем, который управляет этим кластером.
|
|
|
|
|
*/
|
|
|
|
|
public function user()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(User::class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Связь с DAG'ами, привязанными к этому кластеру.
|
|
|
|
|
*/
|
|
|
|
|
public function dags()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(dag::class);
|
|
|
|
|
}
|
|
|
|
|
}
|