UNPKG

@ginstone/nga-api

Version:

26 lines (25 loc) 815 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FavorForum = void 0; const StrUtils_1 = require("../../utils/StrUtils"); const ForumType_1 = require("../../enums/ForumType"); class FavorForum { constructor(raw) { this.id = raw.id; this.name = raw.name; if (raw.fid) { this.forumId = raw.fid; this.type = ForumType_1.ForumType.FORUM; } if (raw.info) { this.info = raw.info; } if (raw.stid) { this.colTid = raw.stid; this.type = ForumType_1.ForumType.COLLECTION; } this.icon = (0, StrUtils_1.getIcon)(raw.stid, raw.fid, raw.stid); this.iconBig = (0, StrUtils_1.getBigIcon)(raw.stid || raw.fid); } } exports.FavorForum = FavorForum;