<?php
namespace App\Models\Gallery;

use Illuminate\Database\Eloquent\Model;

class GalleryItem extends Model
{
    const TYPE_IMAGE = 'image';
    const TYPE_GALLERY = 'gallery';

    const STATUS_NEW = 'new';
    const STATUS_UPLOADING = 'uploading';
    const STATUS_READY = 'ready';

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

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

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

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