2016-09-24 09:34:08 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
|
|
|
|
class Storage extends Model
|
|
|
|
{
|
|
|
|
use Notifiable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
2016-10-28 04:54:38 +01:00
|
|
|
'name',
|
|
|
|
'source',
|
|
|
|
'is_default',
|
|
|
|
'location',
|
|
|
|
'is_internal',
|
|
|
|
'is_active',
|
|
|
|
'auth_url',
|
|
|
|
'tenant_name',
|
|
|
|
'username',
|
|
|
|
'password',
|
|
|
|
'service_name',
|
|
|
|
'service_region',
|
2016-10-28 12:59:36 +01:00
|
|
|
'container_name',
|
2016-11-03 13:33:35 +00:00
|
|
|
'cdn_url',
|
|
|
|
'access_key',
|
2019-09-09 21:52:26 +01:00
|
|
|
'secret_key',
|
2019-09-15 21:37:41 +01:00
|
|
|
'b2_bucket_type',
|
2020-04-20 22:33:42 +01:00
|
|
|
'external_service_id'
|
2016-09-24 09:34:08 +01:00
|
|
|
];
|
2016-09-28 20:32:19 +01:00
|
|
|
|
|
|
|
public function albums()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Album::class);
|
|
|
|
}
|
2020-04-20 22:33:42 +01:00
|
|
|
|
|
|
|
public function externalService()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(ExternalService::class);
|
|
|
|
}
|
2016-09-24 09:34:08 +01:00
|
|
|
}
|