12 lines
367 B
TypeScript
12 lines
367 B
TypeScript
import type { BrandDTO } from "../../common/brands";
|
|
import type { Brand } from "../domain/brand.aggregate";
|
|
export function buildBrand(brand: Brand): BrandDTO {
|
|
return {
|
|
id: brand.id.toPrimitive(),
|
|
name: brand.name.toPrimitive(),
|
|
active: brand.active,
|
|
builtin: brand.builtin,
|
|
logoSvg: brand.logo.getOrUndefined()?.toPrimitive() ?? null,
|
|
};
|
|
}
|