2026-10-07 16:08:48 +00:00
|
|
|
import { z } from "zod/v4";
|
|
|
|
|
|
|
|
|
|
import { BrandInputSchema } from "../api/domain/brand.aggregate";
|
2026-10-09 10:36:05 +00:00
|
|
|
import { BrandLogoSchema } from "../api/domain/value-objects/brand-logo.vo";
|
2026-10-07 16:08:48 +00:00
|
|
|
|
|
|
|
|
export type { BrandInput } from "../api/domain/brand.aggregate";
|
2026-10-09 10:36:05 +00:00
|
|
|
export { BRAND_LOGO_MAX_BYTES, BrandLogoSchema } from "../api/domain/value-objects/brand-logo.vo";
|
2026-10-07 16:08:48 +00:00
|
|
|
|
|
|
|
|
export { BrandInputSchema };
|
|
|
|
|
export const BrandSchema = z.strictObject({
|
|
|
|
|
id: z.uuid(),
|
|
|
|
|
name: z.string().min(1).max(100),
|
|
|
|
|
active: z.boolean(),
|
|
|
|
|
builtin: z.boolean(),
|
2026-10-09 10:36:05 +00:00
|
|
|
logoSvg: BrandLogoSchema.nullable(),
|
2026-10-07 16:08:48 +00:00
|
|
|
});
|
|
|
|
|
export const BrandsResponseSchema = z.strictObject({ brands: z.array(BrandSchema) });
|
|
|
|
|
export const BrandResponseSchema = z.strictObject({ brand: BrandSchema });
|
|
|
|
|
export type BrandDTO = z.infer<typeof BrandSchema>;
|