attributes['used'] = 0; $this->attributes['stock'] = 0; $this->attributes['format'] = ''; parent::__construct($data); } //기본기능 public function getStock(): int { return $this->attributes['stock'] ?? 0; } public function getFormat(): int { return $this->attributes['format'] ?? 0; } public function getUsed(): int { return $this->attributes['used'] ?? 0; } public function getAvailable(): int { return $this->getStock() - $this->getUsed() - $this->getFormat(); } }