<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Workshop extends Model
{
    protected $fillable = [
        'title',
        'description',
        'image',
        'date',
        'time_start',
        'time_end',
        'is_active',
        'status',
    ];

    protected $casts = [
        'status' => 'string',
    ];

    public function users()
    {
        return $this->belongsToMany(User::class, 'user_workshop')->withTimestamps();
    }
}
