2021-08-11 13:45:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
2023-07-29 03:17:36 +00:00
|
|
|
use App\Traits\{AreaSecurity,ScopeActive};
|
2021-08-11 13:45:30 +00:00
|
|
|
|
|
|
|
class Filearea extends Model
|
|
|
|
{
|
2023-07-29 03:17:36 +00:00
|
|
|
use SoftDeletes,ScopeActive,AreaSecurity;
|
2021-08-11 13:45:30 +00:00
|
|
|
|
2024-10-23 10:17:38 +00:00
|
|
|
protected $casts = [
|
|
|
|
'first_file' => 'datetime:Y-m-d H:i:s',
|
|
|
|
'last_file' => 'datetime:Y-m-d H:i:s',
|
|
|
|
];
|
|
|
|
|
2022-11-01 11:24:36 +00:00
|
|
|
protected $fillable = [
|
|
|
|
'name',
|
|
|
|
];
|
|
|
|
|
2021-08-11 13:45:30 +00:00
|
|
|
/* RELATIONS */
|
|
|
|
|
|
|
|
public function addresses()
|
|
|
|
{
|
|
|
|
return $this->belongsToMany(Address::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function domain()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Domain::class);
|
|
|
|
}
|
2024-10-23 11:08:57 +00:00
|
|
|
|
|
|
|
public function files()
|
|
|
|
{
|
|
|
|
return $this->hasMany(File::class);
|
|
|
|
}
|
2021-08-11 13:45:30 +00:00
|
|
|
}
|