UNPKG

@citrineos/base

Version:

The base module for OCPP v2.0.1 including all interfaces. This module is not intended to be used directly, but rather as a dependency for other modules.

33 lines 1.15 kB
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project // // SPDX-License-Identifier: Apache-2.0 import { z } from 'zod'; import { ServerProfileSchema } from './types/ocpi.registration.js'; export const TenantSchema = z.object({ id: z.number().int().optional(), name: z.string(), url: z.string().nullable().optional(), countryCode: z.string().nullable().optional(), partyId: z.string().nullable().optional(), serverProfileOCPI: ServerProfileSchema.nullable().optional(), isUserTenant: z.boolean().default(false), maxChargingStations: z.number().int().nullable().optional(), updatedAt: z.date().optional(), createdAt: z.date().optional(), }); export const TenantProps = TenantSchema.keyof().enum; export const TenantCreateSchema = TenantSchema.omit({ id: true, updatedAt: true, createdAt: true, }); export const TenantUpdateSchema = TenantSchema.partial().omit({ updatedAt: true, createdAt: true, }); export const tenantSchemas = { Tenant: TenantSchema, TenantCreate: TenantCreateSchema, TenantUpdate: TenantUpdateSchema, }; //# sourceMappingURL=tenant.dto.js.map