UNPKG

@upv/ushi-shared

Version:

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

68 lines (67 loc) 1.87 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")); /** * SocialProfileDto * * DTO for representing a user's social presence in the USHI community platform. */ class SocialProfileDto extends BaseDto_1.default { constructor(data) { super(data); this._userId = data.userId; this._displayName = data.displayName; this._handle = data.handle; this._avatarUrl = data.avatarUrl; this._mood = data.mood; this._bio = data.bio; this._tags = data.tags; this._isPrivate = data.isPrivate; this._reputation = data.reputation; } async serialize() { return { ...(await this.serializeBase()), userId: this._userId, displayName: this._displayName ?? null, handle: this._handle, avatarUrl: this._avatarUrl ?? null, mood: this._mood ?? null, bio: this._bio ?? null, tags: this._tags ?? null, isPrivate: this._isPrivate ?? false, reputation: this._reputation ?? 0, }; } get userId() { return this._userId; } get displayName() { return this._displayName; } get handle() { return this._handle; } get avatarUrl() { return this._avatarUrl; } get mood() { return this._mood; } get bio() { return this._bio; } get tags() { return this._tags; } get isPrivate() { return this._isPrivate ?? false; } get reputation() { return this._reputation ?? 0; } } exports.default = SocialProfileDto;