2017-08-04 10:02:02 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @package App\Models
|
|
|
|
*/
|
2017-12-26 05:19:34 +08:00
|
|
|
class UserBid extends BaseModel
|
2017-08-04 10:02:02 +08:00
|
|
|
{
|
2017-12-13 01:49:35 +08:00
|
|
|
public $table = 'user_bids';
|
2017-08-04 10:02:02 +08:00
|
|
|
|
2017-12-13 01:49:35 +08:00
|
|
|
public $fillable = [
|
|
|
|
'user_id',
|
|
|
|
'flight_id',
|
|
|
|
];
|
2017-08-04 10:02:02 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Relationships
|
|
|
|
*/
|
|
|
|
public function flight()
|
|
|
|
{
|
2018-01-08 23:22:12 +08:00
|
|
|
return $this->belongsTo(Flight::class, 'flight_id');
|
2017-08-04 10:02:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
2018-01-08 23:22:12 +08:00
|
|
|
return $this->belongsTo(User::class, 'user_id');
|
2017-08-04 10:02:02 +08:00
|
|
|
}
|
|
|
|
}
|