File size: 652 Bytes
8c85576
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 * @fileOverview Zod schema for the local database.
 *
 * - UserInfoSchema - Schema for user information.
 * - AudioRatingSchema - Schema for audio ratings.
 * - UserInfo - Type for user information.
 * - AudioRating - Type for audio ratings.
 */
import {z} from 'zod';

export const UserInfoSchema = z.object({
  name: z.string(),
  email: z.string().email(),
});
export type UserInfo = z.infer<typeof UserInfoSchema>;

export const AudioRatingSchema = z.object({
  audioA: z.string(),
  audioB: z.string(),
  ratingA: z.number().min(1).max(5),
  ratingB: z.number().min(1).max(5),
});
export type AudioRating = z.infer<typeof AudioRatingSchema>;