store-manage/app/Models/StoreEmployee.php

29 lines
474 B
PHP

<?php
namespace App\Models;
use EloquentFilter\Filterable;
use Illuminate\Database\Eloquent\Relations\Pivot;
/**
* 店员
*/
class StoreEmployee extends Pivot
{
use Filterable;
protected $table = 'store_employees';
public $incrementing = true;
public function store()
{
return $this->belongsTo(Store::class, 'store_id');
}
public function employee()
{
return $this->belongsTo(Employee::class, 'employee_id');
}
}