<?php

namespace App\Entities\Part;

use App\Entities\CommonEntity;

abstract class PartEntity extends CommonEntity
{
    public function __construct(array|null $data = null)
    {
        parent::__construct($data);
    }
    final public function  getClientInfoUID(): string|null
    {
        return $this->attributes['clientinfo_uid'];
    }
    final public function  getServiceInfoUID(): string|null
    {
        return $this->attributes['serviceinfo_uid'];
    }
    final public function  getServerInfoUID(): string|null
    {
        return $this->attributes['serverinfo_uid'];
    }
    final public function  getLineInfoUID(): string
    {
        return $this->attributes['lineinfo_uid'];
    }
    final public function getPrice(): int
    {
        return $this->attributes['price'];
    }
    final public function getStock(): int
    {
        return $this->attributes['stock'];
    }
    final public function getCustomTitle(): string
    {
        return   $this->getTitle() . " " . number_format($this->getPrice()) . "원";
    }
}
