generated from liutk/owl-admin-base
32 lines
615 B
PHP
32 lines
615 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Enums\SignType;
|
|
|
|
/**
|
|
* 员工-打卡流水
|
|
*/
|
|
class EmployeeSignLog extends Model
|
|
{
|
|
protected $table = 'employee_sign_logs';
|
|
|
|
protected $fillable = ['store_id', 'employee_id', 'sign_type', 'remarks', 'position'];
|
|
|
|
protected $casts = [
|
|
'sign_type' => SignType::class,
|
|
'position' => 'json',
|
|
];
|
|
|
|
public function store()
|
|
{
|
|
return $this->belongsTo(Store::class, 'store_id');
|
|
}
|
|
|
|
public function employee()
|
|
{
|
|
return $this->belongsTo(Employee::class, 'employee_id');
|
|
}
|
|
}
|