<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class SliderPhoto extends Model
{
    // Disable timestamp
    public $timestamps = false;


    protected $fillable = ['image', 'url', 'website_category_id'];


    /**
     * Return website gallery for photo
     * @return BelongsTo
     */
    public function category() : BelongsTo
    {
        return $this->belongsTo(Slider::class);
    }

    /**
     * Return descriptions for image
     * @return HasMany
     */
    public function descriptions() :HasMany
    {
        return $this->hasMany(SliderPhotoDescriptions::class);
    }
}
