-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathInventory.ts
82 lines (64 loc) · 2.17 KB
/
Inventory.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// @generated
// This file is automatically generated by Kanel. Do not modify manually.
import { filmId, type FilmId } from './Film';
import { z } from 'zod';
/** Identifier type for inventory */
export type InventoryId = number & { __flavor?: 'InventoryId' };
/** Represents the table public.inventory */
export default interface Inventory {
/** Database type: pg_catalog.int4 */
inventory_id: InventoryId;
/** Database type: pg_catalog.int2 */
film_id: FilmId;
/** Database type: pg_catalog.int2 */
store_id: number;
/** Database type: pg_catalog.timestamp */
last_update: Date;
}
/** Represents the initializer for the table public.inventory */
export interface InventoryInitializer {
/**
* Database type: pg_catalog.int4
* Default value: nextval('inventory_inventory_id_seq'::regclass)
*/
inventory_id?: InventoryId;
/** Database type: pg_catalog.int2 */
film_id: FilmId;
/** Database type: pg_catalog.int2 */
store_id: number;
/**
* Database type: pg_catalog.timestamp
* Default value: now()
*/
last_update?: Date;
}
/** Represents the mutator for the table public.inventory */
export interface InventoryMutator {
/** Database type: pg_catalog.int4 */
inventory_id?: InventoryId;
/** Database type: pg_catalog.int2 */
film_id?: FilmId;
/** Database type: pg_catalog.int2 */
store_id?: number;
/** Database type: pg_catalog.timestamp */
last_update?: Date;
}
export const inventoryId = z.number() as unknown as z.Schema<InventoryId>;
export const inventory = z.object({
inventory_id: inventoryId,
film_id: filmId,
store_id: z.number(),
last_update: z.date(),
}) as unknown as z.Schema<Inventory>;
export const inventoryInitializer = z.object({
inventory_id: inventoryId.optional(),
film_id: filmId,
store_id: z.number(),
last_update: z.date().optional(),
}) as unknown as z.Schema<InventoryInitializer>;
export const inventoryMutator = z.object({
inventory_id: inventoryId.optional(),
film_id: filmId.optional(),
store_id: z.number().optional(),
last_update: z.date().optional(),
}) as unknown as z.Schema<InventoryMutator>;