2026-10-07 16:08:48 +00:00
|
|
|
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,
|
2026-10-09 10:36:05 +00:00
|
|
|
logoSvg: brand.logo.getOrUndefined()?.toPrimitive() ?? null,
|
2026-10-07 16:08:48 +00:00
|
|
|
};
|
|
|
|
|
}
|