feat: init postgresql database

This commit is contained in:
Andras Bacsai
2023-08-07 18:46:40 +02:00
parent 0a040a0531
commit a020bc872d
38 changed files with 430 additions and 66 deletions

25
app/Models/Postgresql.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Postgresql extends BaseModel
{
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();
}
}