boredgame/src/lib/server/api/iam/sessions/dtos/create-session-dto.ts

15 lines
374 B
TypeScript
Raw Normal View History

2024-12-01 23:34:04 +00:00
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>;