feat: Initialize core application structure including authentication, role-based dashboards, service task management, and integration workflows.
This commit is contained in:
36
app/Models/Agent.php
Normal file
36
app/Models/Agent.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Agent extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
'position',
|
||||
'department',
|
||||
'arrival_date',
|
||||
'integration_status',
|
||||
'created_by',
|
||||
'validated_by_rh_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'arrival_date' => 'date',
|
||||
'integration_status' => \App\Enums\IntegrationStatus::class,
|
||||
'validated_by_rh_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function creator()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
|
||||
public function integrationRequests()
|
||||
{
|
||||
return $this->hasMany(IntegrationRequest::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user