2023-03-27 08:44:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
class Application extends BaseModel
|
|
|
|
{
|
2023-03-27 16:14:33 +00:00
|
|
|
public function environment()
|
2023-03-27 08:44:31 +00:00
|
|
|
{
|
2023-03-27 16:14:33 +00:00
|
|
|
return $this->belongsTo(Environment::class);
|
2023-03-27 08:44:31 +00:00
|
|
|
}
|
2023-03-28 13:47:37 +00:00
|
|
|
public function settings()
|
|
|
|
{
|
|
|
|
return $this->hasOne(ApplicationSetting::class);
|
|
|
|
}
|
2023-03-27 12:31:42 +00:00
|
|
|
public function destination()
|
|
|
|
{
|
|
|
|
return $this->morphTo();
|
|
|
|
}
|
2023-03-28 10:09:34 +00:00
|
|
|
public function source()
|
|
|
|
{
|
|
|
|
return $this->morphTo();
|
|
|
|
}
|
2023-03-28 13:47:37 +00:00
|
|
|
public function deployments()
|
|
|
|
{
|
|
|
|
return $this->morphMany(Deployment::class, 'type');
|
|
|
|
}
|
2023-03-27 08:44:31 +00:00
|
|
|
}
|