Skip to content

Commit

Permalink
Reservation model
Browse files Browse the repository at this point in the history
  • Loading branch information
stazrouti committed Sep 19, 2024
1 parent 236b485 commit 8f943a8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions rental-car-backend/app/Models/Reservation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace App\Models;

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

class Reservation extends Model
{
use HasFactory;

protected $fillable = [
'pickup_date',
'dropoff_date',
'pickup_location',
'dropoff_location',
'car_id',
'first_name',
'last_name',
'phone_number',
'email',
'address',
];

// Define the relationship with the Car model if applicable
public function car()
{
return $this->belongsTo(Car::class);
}
}

0 comments on commit 8f943a8

Please sign in to comment.