import { createZodDto } from '@anatine/zod-nestjs'; import { z } from 'zod'; import { AccountsEntitySchema } from '../database/connections/ebitemp-api/entities'; export const loginSchema = z.object({ username: AccountsEntitySchema.shape.username, password: z.string().nonempty(), }); export type Login = z.infer; export class LoginDto extends createZodDto(loginSchema) {} export const loginResSchema = z.object({ accessToken: z.string().jwt(), accessTokenExp: z.string().datetime(), refreshToken: z.string().jwt(), refreshTokenExp: z.string().datetime() }) export type LoginRes = z.infer; export class LoginResDto extends createZodDto(loginResSchema) {}