<?php

namespace addons\webman\model;

use addons\webman\traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class AdminFileAttachment extends Model
{
    use SoftDeletes, HasDateTimeFormatter;

    protected $fillable = ['cate_id', 'uploader_id', 'type', 'file_type', 'name', 'real_name', 'path', 'url', 'ext', 'disk', 'size'];

    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);

        $this->setTable(plugin()->webman->config('database.attachment_table'));
    }
}
