create ad WIP, extract geography methods to dedicated module

This commit is contained in:
sbriat
2023-04-25 17:49:47 +02:00
parent ca693087d2
commit aeead7fb62
53 changed files with 824 additions and 222 deletions

View File

@@ -0,0 +1,18 @@
import { createMap, Mapper } from '@automapper/core';
import { AutomapperProfile, InjectMapper } from '@automapper/nestjs';
import { Injectable } from '@nestjs/common';
import { Ad } from '../domain/entities/ad';
import { AdPresenter } from '../adapters/primaries/ad.presenter';
@Injectable()
export class AdProfile extends AutomapperProfile {
constructor(@InjectMapper() mapper: Mapper) {
super(mapper);
}
override get profile() {
return (mapper: any) => {
createMap(mapper, Ad, AdPresenter);
};
}
}