<?php

namespace Modules\Vrc\Entities;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class VrcTechnician extends Model
{
    protected $table = 'vrc_technicians';

    protected $fillable = [
        'business_id', 'user_id', 'location_id', 'name', 'specialties',
        'hourly_rate', 'commission_pct', 'is_active',
    ];

    protected $casts = [
        'specialties'    => 'array',
        'hourly_rate'    => 'decimal:2',
        'commission_pct' => 'decimal:2',
        'is_active'      => 'boolean',
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(\App\User::class, 'user_id');
    }
}
