<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class EmployeeServiceCommission extends Model
{
    use HasFactory;

    protected $fillable = [
        'employee_id',
        'service_key',
        'sales_percentage',
        'work_percentage',
        'work_trigger_type',
    ];

    protected $casts = [
        'employee_id' => 'int',
        'sales_percentage' => 'int',
        'work_percentage' => 'int',
    ];

    public function employee()
    {
        return $this->belongsTo(Employee::class);
    }
}
