mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
#591 - sites [wip]
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\BackupStatus;
|
||||
use Database\Factories\BackupFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@ -23,7 +24,7 @@
|
||||
*/
|
||||
class Backup extends AbstractModel
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\BackupFactory> */
|
||||
/** @use HasFactory<BackupFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
|
@ -11,6 +11,7 @@
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@ -20,6 +21,7 @@
|
||||
* @property Carbon $updated_at
|
||||
* @property User $user
|
||||
* @property Collection<int, Server> $servers
|
||||
* @property Collection<int, Site> $sites
|
||||
* @property Collection<int, User> $users
|
||||
* @property Collection<int, NotificationChannel> $notificationChannels
|
||||
* @property Collection<int, SourceControl> $sourceControls
|
||||
@ -64,6 +66,14 @@ public function servers(): HasMany
|
||||
return $this->hasMany(Server::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasManyThrough<Site, Server, covariant $this>
|
||||
*/
|
||||
public function sites(): HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(Site::class, Server::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<NotificationChannel, covariant $this>
|
||||
*/
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\ServerProviderFactory;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@ -21,7 +22,7 @@
|
||||
*/
|
||||
class ServerProvider extends AbstractModel
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\ServerProviderFactory> */
|
||||
/** @use HasFactory<ServerProviderFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
|
Reference in New Issue
Block a user