<?php

namespace App\Models;

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

class PieceType extends Model
{
    use HasFactory , SoftDeletes;

    protected $fillable = ['type','svg'];

    public function piece()
    {
        return $this->hasMany(Piece::class)->withTrashed();
    }

    public function rapport()
    {
        return $this->belongsToMany(Rapport::class);
    }

}
