fix: regenerate models and add database
This commit is contained in:
+7
-14
@@ -7,7 +7,6 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -15,8 +14,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $flight_id
|
||||
* @property int $tour_date_id
|
||||
* @property int|null $flight_id
|
||||
* @property int|null $tour_date_id
|
||||
* @property int $adult_count
|
||||
* @property int $child_count
|
||||
* @property int $total_price
|
||||
@@ -25,10 +24,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $status
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Booking $booking
|
||||
* @property Flight $flight
|
||||
* @property TourDate $tourDate
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property User $user
|
||||
* @property Flight|null $flight
|
||||
* @property TourDate|null $tourDate
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
@@ -58,9 +56,9 @@ class Booking extends Model
|
||||
'status'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(Booking::class, 'user_id');
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function flight()
|
||||
@@ -72,9 +70,4 @@ class Booking extends Model
|
||||
{
|
||||
return $this->belongsTo(TourDate::class);
|
||||
}
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class, 'user_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user