fix(db): SSL certificates table and model
- server_id is a foreign id - server_id must be unique as each server can only have 1 CA cert - resource_id must be unique as each resource can only have 1 SSL cert
This commit is contained in:
@@ -11,6 +11,7 @@ class SslCertificate extends Model
|
||||
'ssl_private_key',
|
||||
'resource_type',
|
||||
'resource_id',
|
||||
'server_id',
|
||||
'valid_until',
|
||||
];
|
||||
|
||||
@@ -24,4 +25,9 @@ class SslCertificate extends Model
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function server()
|
||||
{
|
||||
return $this->belongsTo(Server::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user