boredgame/src/lib/server/api/iam/sessions/dtos/create-session-dto.ts
2024-12-01 15:34:04 -08:00

14 lines
374 B
TypeScript

import { z } from 'zod';
export const createSessionDto = z.object({
id: z.string(),
userId: z.string(),
createdAt: z.date({ coerce: true }),
expiresAt: z.date({ coerce: true }),
ipCountry: z.string(),
ipAddress: z.string(),
twoFactorEnabled: z.boolean(),
twoFactorVerified: z.boolean(),
});
export type CreateSessionDto = z.infer<typeof createSessionDto>;