2023-08-07 16:46:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
|
2023-08-07 17:25:32 +00:00
|
|
|
class StandalonePostgres extends BaseModel
|
2023-08-07 16:46:40 +00:00
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
protected $guarded = [];
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'postgres_password' => 'encrypted',
|
|
|
|
|
];
|
|
|
|
|
public function type() {
|
|
|
|
|
return 'postgresql';
|
|
|
|
|
}
|
|
|
|
|
public function environment()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Environment::class);
|
|
|
|
|
}
|
|
|
|
|
public function destination()
|
|
|
|
|
{
|
|
|
|
|
return $this->morphTo();
|
|
|
|
|
}
|
|
|
|
|
}
|