"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserMapper = void 0;
const UserAggregate_1 = require("../../../Domain/User/UserAggregate");
const BaseMapper_1 = require("./BaseMapper");
class UserMapper {
    static toShortDto(user) {
        return {
            id: user.id,
            username: user.username,
            state: user.state,
            authLevel: (user.state === UserAggregate_1.UserState.ADMIN ? 1 : 0),
        };
    }
    static toDetailDto(user) {
        return {
            id: user.id,
            orgid: user.orgid,
            username: user.username,
            email: user.email,
            fname: user.fname,
            lname: user.lname,
            code: user.token,
            type: user.type,
            phone: user.phone,
            state: user.state,
        };
    }
    static toShortDtoList(users) {
        return BaseMapper_1.BaseMapper.toShortDtoListStatic(users, UserMapper.toShortDto);
    }
}
exports.UserMapper = UserMapper;
//# sourceMappingURL=UserMapper.js.map