<?php

namespace App\Models;

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


class DiscoveryOrders extends Model
{
//     use HasFactory;
//     use Notifiable;
//     protected $fillable = [
//     'site_name',
//     'discovery_image',
//     'classe',
//     'lieu_de_rassemblement',
//     'reservation_period',
//     'price',
//     'total_price',
//     'username',
//     'phone',
//     'amount_paid',
//     'invoice_number',
//     'user_id',
//     'is_viewed',
// ];

// public function users()
// {
//     return $this->belongsTo(User::class, 'user_id'); // ou 'users_id' selon la colonne
// }
use HasFactory;
    use Notifiable;

    protected $fillable = [
        'site_name',
        'discovery_image', // garder pour l'image principale
        'classe',
        'lieu_de_rassemblement',
        'reservation_period',
        'price',
        'total_price',
        'username',
        'phone',
        'amount_paid',
        'invoice_number',
        'user_id',
        'is_viewed',
    ];

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    // Relation pour les images supplémentaires
    // public function images()
    // {
    //     return $this->hasMany(Image::class);
    // }

}
