<?php

namespace App\Models;

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

class ArtistImage extends Model
{
    use HasFactory;

    protected $table = 'artist_images';

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'path',
        'artist_id',
    ];

    public function artists(): BelongsTo
    {
        return $this->belongsTo(Artist::class, 'artist_id', 'user_id');
    }
}
