-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathActor.ts
81 lines (63 loc) · 2.05 KB
/
Actor.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
// @generated
// This file is automatically generated by Kanel. Do not modify manually.
import { z } from 'zod';
/** Identifier type for actor */
export type ActorId = number & { __flavor?: 'ActorId' };
/** Represents the table public.actor */
export default interface Actor {
/** Database type: pg_catalog.int4 */
actor_id: ActorId;
/** Database type: pg_catalog.varchar */
first_name: string;
/** Database type: pg_catalog.varchar */
last_name: string;
/** Database type: pg_catalog.timestamp */
last_update: Date;
}
/** Represents the initializer for the table public.actor */
export interface ActorInitializer {
/**
* Database type: pg_catalog.int4
* Default value: nextval('actor_actor_id_seq'::regclass)
*/
actor_id?: ActorId;
/** Database type: pg_catalog.varchar */
first_name: string;
/** Database type: pg_catalog.varchar */
last_name: string;
/**
* Database type: pg_catalog.timestamp
* Default value: now()
*/
last_update?: Date;
}
/** Represents the mutator for the table public.actor */
export interface ActorMutator {
/** Database type: pg_catalog.int4 */
actor_id?: ActorId;
/** Database type: pg_catalog.varchar */
first_name?: string;
/** Database type: pg_catalog.varchar */
last_name?: string;
/** Database type: pg_catalog.timestamp */
last_update?: Date;
}
export const actorId = z.number() as unknown as z.Schema<ActorId>;
export const actor = z.object({
actor_id: actorId,
first_name: z.string(),
last_name: z.string(),
last_update: z.date(),
}) as unknown as z.Schema<Actor>;
export const actorInitializer = z.object({
actor_id: actorId.optional(),
first_name: z.string(),
last_name: z.string(),
last_update: z.date().optional(),
}) as unknown as z.Schema<ActorInitializer>;
export const actorMutator = z.object({
actor_id: actorId.optional(),
first_name: z.string().optional(),
last_name: z.string().optional(),
last_update: z.date().optional(),
}) as unknown as z.Schema<ActorMutator>;