<?php
namespace App\Models\Gallery;

use Illuminate\Database\Eloquent\Model;

class Gallery extends Model
{
    const STATE_TEMPORARY = 'temporary';
    const STATE_ACTIVE = 'active';
    const STATE_ARCHIVED = 'archived';

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

    public function folder()
    {
        return $this->belongsTo('App\Models\Gallery\Folder');
    }

    public function account()
    {
        return $this->belongsTo('App\Models\Account\Account');
    }

    public function gallerySections()
    {
        return $this->hasMany('App\Models\Gallery\GallerySection');
    }

    public function galleryItems()
    {
        return $this->hasMany('App\Models\Gallery\GalleryItem');
    }
}
