<?php

namespace App\Models;

use App\Traits\Description;
use App\Traits\Image;
use App\Traits\ImageCompressor;
use App\Traits\Slug;
use App\Traits\Title;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Pastblog extends Model
{
    use HasFactory,Slug,Description,ImageCompressor,Image,Title;


    protected $fillable =[
        'slug',
        'image',
        'title_az',
        'title_ru',
        'title_en',
        'description_az',
        'description_ru',
        'description_en',
        'partners*',
    ];


    public function gallery(): HasMany
    {
        return $this->hasMany(MediaGallery::class);
    }

    public function category() {
        return $this->belongsTo(Category::class);
    }

}
