2023-03-24 15:47:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2023-06-07 15:08:35 +02:00
|
|
|
|
2023-03-24 15:47:58 +01:00
|
|
|
class PrivateKey extends BaseModel
|
|
|
|
{
|
2023-04-26 15:38:50 +02:00
|
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
|
|
'description',
|
|
|
|
'private_key',
|
|
|
|
'team_id',
|
|
|
|
];
|
2023-06-07 15:08:35 +02:00
|
|
|
static public function ownedByCurrentTeam()
|
|
|
|
{
|
|
|
|
return PrivateKey::whereTeamId(session('currentTeam')->id);
|
|
|
|
}
|
2023-03-24 22:15:36 +01:00
|
|
|
public function servers()
|
|
|
|
{
|
2023-03-27 14:31:42 +02:00
|
|
|
return $this->hasMany(Server::class);
|
2023-03-24 15:47:58 +01:00
|
|
|
}
|
|
|
|
}
|