UNPKG

@upv/ushi-shared

Version:

Shared DTOs, types, and utilities for the USHI platform (LMS, Trials, Social, Wallet).

48 lines (47 loc) 1.25 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const BaseDto_1 = __importDefault(require("../base/BaseDto")); /** * LMSPersonProfileDto * * DTO for user learning profile in the USHI LMS system. */ class LMSPersonProfileDto extends BaseDto_1.default { constructor(data) { super(data); this._userId = data.userId; this._xp = data.xp; this._level = data.level; this._preferences = data.preferences; this._streak = data.streak; } async serialize() { return { ...(await this.serializeBase()), userId: this._userId, xp: this._xp, level: this._level, preferences: this._preferences ?? null, streak: this._streak ?? null, }; } get userId() { return this._userId; } get xp() { return this._xp; } get level() { return this._level; } get preferences() { return this._preferences; } get streak() { return this._streak; } } exports.default = LMSPersonProfileDto;