mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 20:44:19 +00:00
60 lines
1.8 KiB
PHP
60 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Support\Carbon;
|
|
use Spatie\Activitylog\Models\Activity;
|
|
|
|
/**
|
|
* Class File
|
|
*
|
|
* @package App\Models
|
|
* @version August 4, 2020, 4:36 am
|
|
* @property Document document_id
|
|
* @property text file
|
|
* @property int file_type_id
|
|
* @property int $id
|
|
* @property string $file_type
|
|
* @property Carbon|null $deleted_at
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property-read Collection|Activity[] $activities
|
|
* @property-read int|null $activities_count
|
|
* @property-read Model|\Eloquent $causer
|
|
* @property-read Model|\Eloquent $subject
|
|
* @property-read Model|\Eloquent $target
|
|
* @method static Builder|File newModelQuery()
|
|
* @method static Builder|File newQuery()
|
|
* @method static \Illuminate\Database\Query\Builder|File onlyTrashed()
|
|
* @method static Builder|File query()
|
|
* @method static Builder|File whereCreatedAt($value)
|
|
* @method static Builder|File whereDeletedAt($value)
|
|
* @method static Builder|File whereDocumentId($value)
|
|
* @method static Builder|File whereFile($value)
|
|
* @method static Builder|File whereFileType($value)
|
|
* @method static Builder|File whereId($value)
|
|
* @method static Builder|File whereUpdatedAt($value)
|
|
* @method static \Illuminate\Database\Query\Builder|File withTrashed()
|
|
* @method static \Illuminate\Database\Query\Builder|File withoutTrashed()
|
|
* @mixin \Eloquent
|
|
*/
|
|
class File extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'files';
|
|
|
|
protected $fillable = ['file'];
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
public function getFileAttribute($value)
|
|
{
|
|
return $value ? json_decode($value) : [];
|
|
}
|
|
}
|