<?php

namespace App\Entities\Part;

use App\Models\Part\IPModel;

class IPEntity extends PartEntity
{
    const PK = IPModel::PK;
    const TITLE = IPModel::TITLE;
    public function __construct(array|null $data = null)
    {
        $this->attributes['ip'] = '';
        parent::__construct($data);
    }
    public function  getLineInfoUID(): int|null
    {
        return $this->attributes['lineinfo_uid'] ?? null;
    }
    public function  getOldClientInfoUID(): int|null
    {
        return $this->attributes['old_clientinfo_uid'] ?? null;
    }
    final public function  getClientInfoUid(): int|null
    {
        return $this->attributes['clientinfo_uid'];
    }
    final public function  getServiceInfoUid(): int|null
    {
        return $this->attributes['serviceinfo_uid'];
    }
    final public function  getServerInfoUid(): int|null
    {
        return $this->attributes['serverinfo_uid'];
    }
    //기본기능    
    public function getIP(): string
    {
        return $this->attributes['ip'] ?? "";
    }
}
