UNPKG

maplestory-openapi

Version:

This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.

56 lines (52 loc) 1.18 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * 캐시샵 공지 상세 */ class CashshopNoticeDetailDto { /** * 공지 제목 */ title; /** * 공지 링크 */ url; /** * 공지 본문 */ contents; /** * 공지 등록일 */ date; /** * 판매 시작일 */ dateSaleStart; /** * 판매 종료일 */ dateSaleEnd; /** * 상시 판매 여부 (true - 상시) */ ongoingFlag; constructor(obj) { const { title, url, contents, date, date_sale_start, date_sale_end, ongoing_flag, } = obj; this.title = title; this.url = url; this.contents = contents; this.date = new Date(date); this.dateSaleStart = date_sale_start ? new Date(date_sale_start) : null; this.dateSaleEnd = date_sale_end ? new Date(date_sale_end) : null; this.ongoingFlag = ongoing_flag; } /** * 상시 판매 여부 (true - 상시) */ get isOnGoing() { return this.ongoingFlag === 'true'; } } exports.CashshopNoticeDetailDto = CashshopNoticeDetailDto;