01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
64
app/Models/TravelCompany.php
Normal file
64
app/Models/TravelCompany.php
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class TravelCompany
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property float $percentage
|
||||
* @property bool $is_allowed_edit_commission
|
||||
* @property bool $is_inhouse
|
||||
* @property Collection|Booking[] $bookings
|
||||
* @property Collection|BookingServiceItem[] $booking_service_items
|
||||
* @package App\Models
|
||||
* @property-read int|null $booking_service_items_count
|
||||
* @property-read int|null $bookings_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereIsAllowedEditCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereIsInhouse($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany wherePercentage($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelCompany extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'travel_company';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'percentage' => 'float',
|
||||
'is_allowed_edit_commission' => 'bool',
|
||||
'is_inhouse' => 'bool'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'percentage',
|
||||
'is_allowed_edit_commission',
|
||||
'is_inhouse'
|
||||
];
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
|
||||
public function booking_service_items()
|
||||
{
|
||||
return $this->hasMany(BookingServiceItem::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue