@ginstone/nga-api
Version:
33 lines (32 loc) • 1.06 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParentForum = exports.ForumInfo = void 0;
const StrUtils_1 = require("../utils/StrUtils");
class ForumInfo {
constructor(raw) {
this.description = raw.descrip;
this.forumId = raw.fid;
this.name = raw.name;
this.parent = raw.parent ? new ParentForum(raw.parent) : undefined;
this.relevance = raw.relevance;
this.colTid = raw.stid;
this.url = raw.url;
this.topic_misc_var = raw.topic_misc_var;
this.icon = (0, StrUtils_1.getIcon)(raw.stid, raw.fid, raw.stid);
this.iconBig = (0, StrUtils_1.getBigIcon)(raw.stid || raw.fid);
}
}
exports.ForumInfo = ForumInfo;
/**
* 父版面信息
*/
class ParentForum {
constructor({ descrip, fid, name }) {
this.description = descrip;
this.forumId = fid;
this.name = name;
this.icon = (0, StrUtils_1.getIcon)(false, fid);
this.iconBig = (0, StrUtils_1.getBigIcon)(fid);
}
}
exports.ParentForum = ParentForum;