19 lines
445 B
TypeScript
19 lines
445 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const AccessLogSchema = z.object({
|
|
id: z.number().int(),
|
|
request_id: z.string(),
|
|
username: z.string().nullable(),
|
|
message: z.string(),
|
|
ip: z.string(),
|
|
user_agent: z.string(),
|
|
request_method: z.string(),
|
|
request_path: z.string(),
|
|
referer: z.string(),
|
|
status_code: z.number(),
|
|
response_time_ms: z.number(),
|
|
started_at: z.string(),
|
|
})
|
|
|
|
export type AccessLog = z.infer<typeof AccessLogSchema>
|