39 lines
799 B
PHP
39 lines
799 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\Juil;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class PmisAttendanceWorker extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
|
||
|
|
protected $table = 'pmis_attendance_workers';
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'tenant_id',
|
||
|
|
'attendance_id',
|
||
|
|
'work_type',
|
||
|
|
'job_type',
|
||
|
|
'name',
|
||
|
|
'man_days',
|
||
|
|
'amount',
|
||
|
|
'work_content',
|
||
|
|
'sort_order',
|
||
|
|
'options',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'man_days' => 'decimal:1',
|
||
|
|
'amount' => 'integer',
|
||
|
|
'options' => 'array',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function attendance(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(PmisDailyAttendance::class, 'attendance_id');
|
||
|
|
}
|
||
|
|
}
|