StocksNew/Modules/Attendance/app/Models/Attendance.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

40 lines
835 B
PHP

<?php
namespace Modules\Attendance\Models;
use App\Models\Scopes\CreatedByScope;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Attendance extends Model
{
use HasFactory;
protected $table = 'tbl_attendances';
protected $primaryKey = 'attendance_id';
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'clock_in_time',
'clock_out_time',
'clock_in_ip',
'clock_out_ip',
'work_from_type',
'type',
'date',
'status',
'total_hours',
'description',
'remarks',
'createdBy',
'updatedBy',
];
protected static function booted(): void
{
static::addGlobalScope(new CreatedByScope);
}
}