feat: init postgresql database
This commit is contained in:
25
app/Models/Postgresql.php
Normal file
25
app/Models/Postgresql.php
Normal 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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user