UNPKG

agora-edu-core

Version:

Core APIs for building an online classroom

72 lines (69 loc) 1.54 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EduUserSessionInfo = exports.EduUser = void 0; var _ = require("../../../.."); var _utils = require("../../../../utils"); /** * 用户对象 */ /** @en * User object */ class EduUser { constructor(user) { this.userUuid = void 0; this.userName = void 0; this.userRole = void 0; this.userProperties = void 0; this.userUuid = user.userUuid; this.userName = user.userName; this.userRole = (0, _utils.RteRole2EduRole)(_.EduClassroomConfig.shared.sessionInfo.roomType, user.userRole); this.userProperties = user.userProperties; } toPlainObject() { return { userUuid: this.userUuid, userName: this.userName, userRole: this.userRole, userProperties: this.userProperties }; } } /** * 用户对象 */ /** @en * Plain user object */ /** * 教室会话信息 */ /** @en * Classroom session information */ exports.EduUser = EduUser; /** * 教室会话信息 */ /** @en * Classroom session information */ class EduUserSessionInfo { constructor(data) { this.roomUuid = void 0; this.roomName = void 0; this.roomType = void 0; this.userUuid = void 0; this.userName = void 0; this.role = void 0; this.roomUuid = data.roomUuid; this.roomName = data.roomName; this.roomType = data.roomType; this.userUuid = data.userUuid; this.userName = data.userName; this.role = data.role; } } exports.EduUserSessionInfo = EduUserSessionInfo;