<?php

namespace Modules\Slider\Models;

use Modules\Slider\Models\CountryDescription;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;

class Slider extends Model
{
    //use soft delete
    use SoftDeletes;

    protected $fillable = [
        'image','store_id'
    ];


    /**
     * Get current description of the the Room
     * @return HasOne
     */
    public function currentDescription() :HasOne
    {
        return $this->hasOne(SliderDescription::class)->where('language_id', currentLanguage()->id);
    }
}
