<?php

namespace App\Models;

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

class Car extends Model
{
    use HasFactory;
    protected $fillable = ['plate', 'engine', 'brand', 'model', 'chassis', 'year', 'color', 'client_id'];

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

    public function Sale()
    {
        return $this->hasMany(Sale::class);
    }
}
