<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;

class UserFolder extends Model
{
	use HasDateTimeFormatter;

    protected $table = 'user_folder';

    protected $fillable = [
        'user_id',
        'name',
        'is_private',
        'is_del',
        'images'
    ];

    protected $casts = [
        'images'=>'array'
    ];

    public function images(){
        return $this->hasMany(UserFolderImage::class,'folder_id','id');
    }
}
