mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
45 lines
854 B
PHP
Executable File
45 lines
854 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @property int $server_id
|
|
* @property string $username
|
|
* @property string $password
|
|
* @property array $databases
|
|
* @property string $host
|
|
* @property string $status
|
|
* @property Server $server
|
|
*/
|
|
class DatabaseUser extends AbstractModel
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'server_id',
|
|
'username',
|
|
'password',
|
|
'databases',
|
|
'host',
|
|
'status',
|
|
];
|
|
|
|
protected $casts = [
|
|
'server_id' => 'integer',
|
|
'password' => 'encrypted',
|
|
'databases' => 'array',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'password',
|
|
];
|
|
|
|
public function server(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Server::class);
|
|
}
|
|
}
|