attributes['serviceinfo_uid']); } public function getItemType(): string { return $this->attributes['item_type']; } public function getItemUid(): int { return intval($this->attributes['item_uid']); } public function getAmount(): int { return intval($this->attributes['amount']); } public function getBillingAt(): string { return $this->attributes['billing_at']; } public function getView_CounDueAt(): string { $now = new DateTime(); // 오늘 날짜 $due = new DateTime($this->getBillingAt()); if ($due < $now) { $interval = $due->diff($now); return "{$interval->days}일 전"; } else if ($due > $now) { $interval = $now->diff($due); return "{$interval->days}일 남음"; } else { return "당일"; } } }