mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
60 lines
2.1 KiB
PHP
60 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* App\Booking
|
|
*
|
|
* @property int $id
|
|
* @property int $item_id
|
|
* @property int $amount
|
|
* @property int $bookable_id
|
|
* @property string $bookable_type
|
|
* @property int $user_id
|
|
* @property string $comment
|
|
* @property \Illuminate\Support\Carbon|null $created_at
|
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
* @property-read \Illuminate\Database\Eloquent\Model|\Eloquent $bookable
|
|
* @property-read \App\Item $item
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
|
|
* @property-read int|null $logs_count
|
|
* @property-read \App\User $user
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereAmount($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereBookableId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereBookableType($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereComment($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereItemId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereUpdatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereUserId($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Booking extends Model
|
|
{
|
|
public function bookable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
|
|
public function item()
|
|
{
|
|
return $this->belongsTo('App\Item');
|
|
}
|
|
|
|
public function logs()
|
|
{
|
|
return $this->morphMany('App\Log', 'logable');
|
|
}
|
|
}
|