47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class Branch
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property Collection|Booking[] $bookings
|
|
* @property Collection|SfGuardUser[] $sf_guard_users
|
|
* @package App\Models
|
|
* @property-read int|null $bookings_count
|
|
* @property-read int|null $sf_guard_users_count
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Branch newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Branch newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Branch query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Branch whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Branch whereName($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Branch extends Model
|
|
{
|
|
protected $table = 'branch';
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'name'
|
|
];
|
|
|
|
public function bookings()
|
|
{
|
|
return $this->hasMany(Booking::class);
|
|
}
|
|
|
|
public function sf_guard_users()
|
|
{
|
|
return $this->hasMany(SfGuardUser::class);
|
|
}
|
|
}
|