2025-01-05 14:14:00 +01:00
|
|
|
import { protocolAgenda } from "../../../../entity/club/protocol/protocolAgenda";
|
|
|
|
import { ProtocolAgendaViewModel } from "../../../../viewmodel/admin/club/protocol/protocolAgenda.models";
|
2024-10-11 14:44:09 +02:00
|
|
|
|
|
|
|
export default abstract class ProtocolAgendaFactory {
|
|
|
|
/**
|
|
|
|
* @description map record to protocolAgenda
|
|
|
|
* @param {protocol} record
|
|
|
|
* @returns {ProtocolAgendaViewModel}
|
|
|
|
*/
|
|
|
|
public static mapToSingle(record: protocolAgenda): ProtocolAgendaViewModel {
|
|
|
|
return {
|
|
|
|
id: record.id,
|
|
|
|
topic: record.topic,
|
|
|
|
context: record.context,
|
2025-03-21 09:46:29 +01:00
|
|
|
sort: record.sort,
|
2024-10-15 16:25:42 +02:00
|
|
|
protocolId: record.protocolId,
|
2024-10-11 14:44:09 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @description map records to protocolAgenda
|
|
|
|
* @param {Array<protocol>} records
|
|
|
|
* @returns {Array<ProtocolAgendaViewModel>}
|
|
|
|
*/
|
|
|
|
public static mapToBase(records: Array<protocolAgenda>): Array<ProtocolAgendaViewModel> {
|
|
|
|
return records.map((r) => this.mapToSingle(r));
|
|
|
|
}
|
|
|
|
}
|