<?php
namespace Components\Models;

class CustomerInfo extends BaseModel
{
    protected static string $table = 'customers_info';
    protected static string $primaryKey = 'customers_info_id';

    public static function isReadOnly(): bool
    {
        return true;
    }

    public function customer(): ?Customer
    {
        $customer = $this->belongsTo(Customer::class, 'customers_info_id', 'customers_id');
        return $customer instanceof Customer ? $customer : null;
    }
}
