attributes['item_type']; } public function getIsOnetime(): int { return $this->attributes['isOnetime']; } public function getAmount(): int { return $this->attributes['amount']; } public function getBillingAt(): string { return $this->attributes['billing_at']; } public function getPayMethod(): string { return $this->attributes['pay_method']; } public function getCountDueAt(): string { $result = ""; if ($this->getStatus() === self::DEFAULT_STATUS) { $now = new DateTime(); // 오늘 날짜 $due = new DateTime($this->getBillingAt()); if ($due < $now) { $interval = $due->diff($now); $result = "{$interval->days}일지남"; } else if ($due > $now) { $interval = $now->diff($due); $day = $interval->days + 1; $result = "{$day}일전"; } else { $result = "당일"; } } return $result; } }