Deploy Ladill Queue / deploy (push) Successful in 2m17s
Counters gain destination/staff metadata; tickets can be pre-assigned to a service point with assigned_only queues for healthcare while shared_pool preserves generic bank/government behavior. Display and announcements expose ticket, staff, and destination clearly for Care and public boards. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
975 B
PHP
40 lines
975 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\BelongsToOwner;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Department extends Model
|
|
{
|
|
use BelongsToOwner, SoftDeletes;
|
|
|
|
protected $table = 'queue_departments';
|
|
|
|
protected $fillable = [
|
|
'owner_ref', 'branch_id', 'name', 'type', 'external_key', 'is_active',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['is_active' => 'boolean'];
|
|
}
|
|
|
|
public function branch(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Branch::class, 'branch_id');
|
|
}
|
|
|
|
public function counters(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
{
|
|
return $this->hasMany(Counter::class, 'department_id');
|
|
}
|
|
|
|
public function serviceQueues(): \Illuminate\Database\Eloquent\Relations\HasMany
|
|
{
|
|
return $this->hasMany(ServiceQueue::class, 'department_id');
|
|
}
|
|
}
|