<?php
namespace App\Models;

class CommissionPayoutCycle
{
    public $id;
    public $user_id;
    public $billing_month;
    public $calculated_amount;
    public $override_amount;
    public $final_payable_amount;
    public $manager_id;
    public $status;
    public $override_reason;
    public $approval_deadline;
    public $escalate_to_finance;
    public $created_at;
    public $updated_at;
    public $salesperson_name;
    public $manager_name;
    public $commission_line_count;
    public $commission_line_statuses;

    public function __construct(array $data = [])
    {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }

    public function toArray(): array
    {
        return get_object_vars($this);
    }
}
