init
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class File
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $extension
|
||||
* @property int $size
|
||||
* @property string $original_name
|
||||
* @property string $path
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Collection|Flight[] $flights
|
||||
* @property Collection|Tour[] $tours
|
||||
* @property Collection|User[] $users
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class File extends Model
|
||||
{
|
||||
protected $table = 'files';
|
||||
|
||||
protected $casts = [
|
||||
'size' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'extension',
|
||||
'size',
|
||||
'original_name',
|
||||
'path'
|
||||
];
|
||||
|
||||
public function flights()
|
||||
{
|
||||
return $this->hasMany(Flight::class);
|
||||
}
|
||||
|
||||
public function tours()
|
||||
{
|
||||
return $this->hasMany(Tour::class);
|
||||
}
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user