<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class TailorGallery extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id',
        'photo',
        'title',
        'description',
        'category'
    ];

    protected $casts = [
        'id' => 'integer',
        'user_id' => 'integer'
    ];

    /**
     * Get the tailor that owns the gallery item
     */
    public function tailor()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
} 