education controller, service, command
This commit is contained in:
parent
5368a96d0f
commit
fded8a663a
29 changed files with 884 additions and 5 deletions
26
src/factory/admin/configuration/education.ts
Normal file
26
src/factory/admin/configuration/education.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { education } from "../../../entity/configuration/education";
|
||||
import { EducationViewModel } from "../../../viewmodel/admin/configuration/education.models";
|
||||
|
||||
export default abstract class EducationFactory {
|
||||
/**
|
||||
* @description map record to education
|
||||
* @param {education} record
|
||||
* @returns {AwardViewModel}
|
||||
*/
|
||||
public static mapToSingle(record: education): EducationViewModel {
|
||||
return {
|
||||
id: record.id,
|
||||
education: record.education,
|
||||
description: record.description,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @description map records to education
|
||||
* @param {Array<education>} records
|
||||
* @returns {Array<AwardViewModel>}
|
||||
*/
|
||||
public static mapToBase(records: Array<education>): Array<EducationViewModel> {
|
||||
return records.map((r) => this.mapToSingle(r));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue