Files
SerpentRace/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js
T

36 lines
1.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContactMapper = void 0;
class ContactMapper {
static toShortDto(contact) {
return {
id: contact.id,
name: contact.name,
email: contact.email,
type: contact.type,
createDate: contact.createDate,
state: contact.state,
};
}
static toDetailDto(contact) {
return {
id: contact.id,
name: contact.name,
email: contact.email,
userid: contact.userid,
type: contact.type,
txt: contact.txt,
state: contact.state,
createDate: contact.createDate,
updateDate: contact.updateDate,
adminResponse: contact.adminResponse,
responseDate: contact.responseDate,
respondedBy: contact.respondedBy,
};
}
static toShortDtoList(contacts) {
return contacts.map(this.toShortDto);
}
}
exports.ContactMapper = ContactMapper;
//# sourceMappingURL=ContactMapper.js.map