@voyant-travel/mice 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/routes.d.ts +396 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +68 -0
- package/dist/schema-sessions.d.ts +437 -0
- package/dist/schema-sessions.d.ts.map +1 -0
- package/dist/schema-sessions.js +64 -0
- package/dist/schema.d.ts +330 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +51 -0
- package/dist/service-sessions.d.ts +25 -0
- package/dist/service-sessions.d.ts.map +1 -0
- package/dist/service-sessions.js +76 -0
- package/dist/service.d.ts +18 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +44 -0
- package/dist/validation-sessions.d.ts +92 -0
- package/dist/validation-sessions.d.ts.map +1 -0
- package/dist/validation-sessions.js +41 -0
- package/dist/validation.d.ts +98 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +41 -0
- package/migrations/0000_mice_baseline.sql +32 -0
- package/migrations/0001_mice_baseline.sql +45 -0
- package/migrations/meta/_journal.json +20 -0
- package/package.json +75 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Program agenda — timed, capacity-bound sessions (keynote → breakouts → gala)
|
|
3
|
+
* and their inclusions (F&B, AV, materials, signage). This is the model the
|
|
4
|
+
* gap analysis found missing: product itineraries carry service/cost/quantity
|
|
5
|
+
* but no start/end/capacity. See RFC voyant#1489 (Phase 2).
|
|
6
|
+
*/
|
|
7
|
+
export declare const sessionTypeEnum: import("drizzle-orm/pg-core").PgEnum<["keynote", "breakout", "meal", "networking", "gala", "excursion", "free"]>;
|
|
8
|
+
export declare const sessionInclusionKindEnum: import("drizzle-orm/pg-core").PgEnum<["fnb", "av", "materials", "signage", "other"]>;
|
|
9
|
+
export declare const programSessions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
10
|
+
name: "mice_program_sessions";
|
|
11
|
+
schema: undefined;
|
|
12
|
+
columns: {
|
|
13
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
14
|
+
name: string;
|
|
15
|
+
tableName: "mice_program_sessions";
|
|
16
|
+
dataType: "string";
|
|
17
|
+
columnType: "PgText";
|
|
18
|
+
data: string;
|
|
19
|
+
driverParam: string;
|
|
20
|
+
notNull: true;
|
|
21
|
+
hasDefault: true;
|
|
22
|
+
isPrimaryKey: true;
|
|
23
|
+
isAutoincrement: false;
|
|
24
|
+
hasRuntimeDefault: true;
|
|
25
|
+
enumValues: [string, ...string[]];
|
|
26
|
+
baseColumn: never;
|
|
27
|
+
identity: undefined;
|
|
28
|
+
generated: undefined;
|
|
29
|
+
}, {}, {}>;
|
|
30
|
+
programId: import("drizzle-orm/pg-core").PgColumn<{
|
|
31
|
+
name: string;
|
|
32
|
+
tableName: "mice_program_sessions";
|
|
33
|
+
dataType: "string";
|
|
34
|
+
columnType: "PgText";
|
|
35
|
+
data: string;
|
|
36
|
+
driverParam: string;
|
|
37
|
+
notNull: true;
|
|
38
|
+
hasDefault: false;
|
|
39
|
+
isPrimaryKey: false;
|
|
40
|
+
isAutoincrement: false;
|
|
41
|
+
hasRuntimeDefault: false;
|
|
42
|
+
enumValues: [string, ...string[]];
|
|
43
|
+
baseColumn: never;
|
|
44
|
+
identity: undefined;
|
|
45
|
+
generated: undefined;
|
|
46
|
+
}, {}, {}>;
|
|
47
|
+
functionSpaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
48
|
+
name: string;
|
|
49
|
+
tableName: "mice_program_sessions";
|
|
50
|
+
dataType: "string";
|
|
51
|
+
columnType: "PgText";
|
|
52
|
+
data: string;
|
|
53
|
+
driverParam: string;
|
|
54
|
+
notNull: false;
|
|
55
|
+
hasDefault: false;
|
|
56
|
+
isPrimaryKey: false;
|
|
57
|
+
isAutoincrement: false;
|
|
58
|
+
hasRuntimeDefault: false;
|
|
59
|
+
enumValues: [string, ...string[]];
|
|
60
|
+
baseColumn: never;
|
|
61
|
+
identity: undefined;
|
|
62
|
+
generated: undefined;
|
|
63
|
+
}, {}, {}>;
|
|
64
|
+
title: import("drizzle-orm/pg-core").PgColumn<{
|
|
65
|
+
name: "title";
|
|
66
|
+
tableName: "mice_program_sessions";
|
|
67
|
+
dataType: "string";
|
|
68
|
+
columnType: "PgText";
|
|
69
|
+
data: string;
|
|
70
|
+
driverParam: string;
|
|
71
|
+
notNull: true;
|
|
72
|
+
hasDefault: false;
|
|
73
|
+
isPrimaryKey: false;
|
|
74
|
+
isAutoincrement: false;
|
|
75
|
+
hasRuntimeDefault: false;
|
|
76
|
+
enumValues: [string, ...string[]];
|
|
77
|
+
baseColumn: never;
|
|
78
|
+
identity: undefined;
|
|
79
|
+
generated: undefined;
|
|
80
|
+
}, {}, {}>;
|
|
81
|
+
sessionType: import("drizzle-orm/pg-core").PgColumn<{
|
|
82
|
+
name: "session_type";
|
|
83
|
+
tableName: "mice_program_sessions";
|
|
84
|
+
dataType: "string";
|
|
85
|
+
columnType: "PgEnumColumn";
|
|
86
|
+
data: "keynote" | "breakout" | "meal" | "networking" | "gala" | "excursion" | "free";
|
|
87
|
+
driverParam: string;
|
|
88
|
+
notNull: true;
|
|
89
|
+
hasDefault: true;
|
|
90
|
+
isPrimaryKey: false;
|
|
91
|
+
isAutoincrement: false;
|
|
92
|
+
hasRuntimeDefault: false;
|
|
93
|
+
enumValues: ["keynote", "breakout", "meal", "networking", "gala", "excursion", "free"];
|
|
94
|
+
baseColumn: never;
|
|
95
|
+
identity: undefined;
|
|
96
|
+
generated: undefined;
|
|
97
|
+
}, {}, {}>;
|
|
98
|
+
dayDate: import("drizzle-orm/pg-core").PgColumn<{
|
|
99
|
+
name: "day_date";
|
|
100
|
+
tableName: "mice_program_sessions";
|
|
101
|
+
dataType: "string";
|
|
102
|
+
columnType: "PgDateString";
|
|
103
|
+
data: string;
|
|
104
|
+
driverParam: string;
|
|
105
|
+
notNull: false;
|
|
106
|
+
hasDefault: false;
|
|
107
|
+
isPrimaryKey: false;
|
|
108
|
+
isAutoincrement: false;
|
|
109
|
+
hasRuntimeDefault: false;
|
|
110
|
+
enumValues: undefined;
|
|
111
|
+
baseColumn: never;
|
|
112
|
+
identity: undefined;
|
|
113
|
+
generated: undefined;
|
|
114
|
+
}, {}, {}>;
|
|
115
|
+
startsAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
116
|
+
name: "starts_at";
|
|
117
|
+
tableName: "mice_program_sessions";
|
|
118
|
+
dataType: "date";
|
|
119
|
+
columnType: "PgTimestamp";
|
|
120
|
+
data: Date;
|
|
121
|
+
driverParam: string;
|
|
122
|
+
notNull: false;
|
|
123
|
+
hasDefault: false;
|
|
124
|
+
isPrimaryKey: false;
|
|
125
|
+
isAutoincrement: false;
|
|
126
|
+
hasRuntimeDefault: false;
|
|
127
|
+
enumValues: undefined;
|
|
128
|
+
baseColumn: never;
|
|
129
|
+
identity: undefined;
|
|
130
|
+
generated: undefined;
|
|
131
|
+
}, {}, {}>;
|
|
132
|
+
endsAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
133
|
+
name: "ends_at";
|
|
134
|
+
tableName: "mice_program_sessions";
|
|
135
|
+
dataType: "date";
|
|
136
|
+
columnType: "PgTimestamp";
|
|
137
|
+
data: Date;
|
|
138
|
+
driverParam: string;
|
|
139
|
+
notNull: false;
|
|
140
|
+
hasDefault: false;
|
|
141
|
+
isPrimaryKey: false;
|
|
142
|
+
isAutoincrement: false;
|
|
143
|
+
hasRuntimeDefault: false;
|
|
144
|
+
enumValues: undefined;
|
|
145
|
+
baseColumn: never;
|
|
146
|
+
identity: undefined;
|
|
147
|
+
generated: undefined;
|
|
148
|
+
}, {}, {}>;
|
|
149
|
+
track: import("drizzle-orm/pg-core").PgColumn<{
|
|
150
|
+
name: "track";
|
|
151
|
+
tableName: "mice_program_sessions";
|
|
152
|
+
dataType: "string";
|
|
153
|
+
columnType: "PgText";
|
|
154
|
+
data: string;
|
|
155
|
+
driverParam: string;
|
|
156
|
+
notNull: false;
|
|
157
|
+
hasDefault: false;
|
|
158
|
+
isPrimaryKey: false;
|
|
159
|
+
isAutoincrement: false;
|
|
160
|
+
hasRuntimeDefault: false;
|
|
161
|
+
enumValues: [string, ...string[]];
|
|
162
|
+
baseColumn: never;
|
|
163
|
+
identity: undefined;
|
|
164
|
+
generated: undefined;
|
|
165
|
+
}, {}, {}>;
|
|
166
|
+
capacity: import("drizzle-orm/pg-core").PgColumn<{
|
|
167
|
+
name: "capacity";
|
|
168
|
+
tableName: "mice_program_sessions";
|
|
169
|
+
dataType: "number";
|
|
170
|
+
columnType: "PgInteger";
|
|
171
|
+
data: number;
|
|
172
|
+
driverParam: string | number;
|
|
173
|
+
notNull: false;
|
|
174
|
+
hasDefault: false;
|
|
175
|
+
isPrimaryKey: false;
|
|
176
|
+
isAutoincrement: false;
|
|
177
|
+
hasRuntimeDefault: false;
|
|
178
|
+
enumValues: undefined;
|
|
179
|
+
baseColumn: never;
|
|
180
|
+
identity: undefined;
|
|
181
|
+
generated: undefined;
|
|
182
|
+
}, {}, {}>;
|
|
183
|
+
requiresRegistration: import("drizzle-orm/pg-core").PgColumn<{
|
|
184
|
+
name: "requires_registration";
|
|
185
|
+
tableName: "mice_program_sessions";
|
|
186
|
+
dataType: "boolean";
|
|
187
|
+
columnType: "PgBoolean";
|
|
188
|
+
data: boolean;
|
|
189
|
+
driverParam: boolean;
|
|
190
|
+
notNull: true;
|
|
191
|
+
hasDefault: true;
|
|
192
|
+
isPrimaryKey: false;
|
|
193
|
+
isAutoincrement: false;
|
|
194
|
+
hasRuntimeDefault: false;
|
|
195
|
+
enumValues: undefined;
|
|
196
|
+
baseColumn: never;
|
|
197
|
+
identity: undefined;
|
|
198
|
+
generated: undefined;
|
|
199
|
+
}, {}, {}>;
|
|
200
|
+
notes: import("drizzle-orm/pg-core").PgColumn<{
|
|
201
|
+
name: "notes";
|
|
202
|
+
tableName: "mice_program_sessions";
|
|
203
|
+
dataType: "string";
|
|
204
|
+
columnType: "PgText";
|
|
205
|
+
data: string;
|
|
206
|
+
driverParam: string;
|
|
207
|
+
notNull: false;
|
|
208
|
+
hasDefault: false;
|
|
209
|
+
isPrimaryKey: false;
|
|
210
|
+
isAutoincrement: false;
|
|
211
|
+
hasRuntimeDefault: false;
|
|
212
|
+
enumValues: [string, ...string[]];
|
|
213
|
+
baseColumn: never;
|
|
214
|
+
identity: undefined;
|
|
215
|
+
generated: undefined;
|
|
216
|
+
}, {}, {}>;
|
|
217
|
+
metadata: import("drizzle-orm/pg-core").PgColumn<{
|
|
218
|
+
name: "metadata";
|
|
219
|
+
tableName: "mice_program_sessions";
|
|
220
|
+
dataType: "json";
|
|
221
|
+
columnType: "PgJsonb";
|
|
222
|
+
data: Record<string, unknown>;
|
|
223
|
+
driverParam: unknown;
|
|
224
|
+
notNull: false;
|
|
225
|
+
hasDefault: false;
|
|
226
|
+
isPrimaryKey: false;
|
|
227
|
+
isAutoincrement: false;
|
|
228
|
+
hasRuntimeDefault: false;
|
|
229
|
+
enumValues: undefined;
|
|
230
|
+
baseColumn: never;
|
|
231
|
+
identity: undefined;
|
|
232
|
+
generated: undefined;
|
|
233
|
+
}, {}, {
|
|
234
|
+
$type: Record<string, unknown>;
|
|
235
|
+
}>;
|
|
236
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
237
|
+
name: "created_at";
|
|
238
|
+
tableName: "mice_program_sessions";
|
|
239
|
+
dataType: "date";
|
|
240
|
+
columnType: "PgTimestamp";
|
|
241
|
+
data: Date;
|
|
242
|
+
driverParam: string;
|
|
243
|
+
notNull: true;
|
|
244
|
+
hasDefault: true;
|
|
245
|
+
isPrimaryKey: false;
|
|
246
|
+
isAutoincrement: false;
|
|
247
|
+
hasRuntimeDefault: false;
|
|
248
|
+
enumValues: undefined;
|
|
249
|
+
baseColumn: never;
|
|
250
|
+
identity: undefined;
|
|
251
|
+
generated: undefined;
|
|
252
|
+
}, {}, {}>;
|
|
253
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
254
|
+
name: "updated_at";
|
|
255
|
+
tableName: "mice_program_sessions";
|
|
256
|
+
dataType: "date";
|
|
257
|
+
columnType: "PgTimestamp";
|
|
258
|
+
data: Date;
|
|
259
|
+
driverParam: string;
|
|
260
|
+
notNull: true;
|
|
261
|
+
hasDefault: true;
|
|
262
|
+
isPrimaryKey: false;
|
|
263
|
+
isAutoincrement: false;
|
|
264
|
+
hasRuntimeDefault: false;
|
|
265
|
+
enumValues: undefined;
|
|
266
|
+
baseColumn: never;
|
|
267
|
+
identity: undefined;
|
|
268
|
+
generated: undefined;
|
|
269
|
+
}, {}, {}>;
|
|
270
|
+
};
|
|
271
|
+
dialect: "pg";
|
|
272
|
+
}>;
|
|
273
|
+
export declare const sessionInclusions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
274
|
+
name: "mice_session_inclusions";
|
|
275
|
+
schema: undefined;
|
|
276
|
+
columns: {
|
|
277
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
278
|
+
name: string;
|
|
279
|
+
tableName: "mice_session_inclusions";
|
|
280
|
+
dataType: "string";
|
|
281
|
+
columnType: "PgText";
|
|
282
|
+
data: string;
|
|
283
|
+
driverParam: string;
|
|
284
|
+
notNull: true;
|
|
285
|
+
hasDefault: true;
|
|
286
|
+
isPrimaryKey: true;
|
|
287
|
+
isAutoincrement: false;
|
|
288
|
+
hasRuntimeDefault: true;
|
|
289
|
+
enumValues: [string, ...string[]];
|
|
290
|
+
baseColumn: never;
|
|
291
|
+
identity: undefined;
|
|
292
|
+
generated: undefined;
|
|
293
|
+
}, {}, {}>;
|
|
294
|
+
sessionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
295
|
+
name: string;
|
|
296
|
+
tableName: "mice_session_inclusions";
|
|
297
|
+
dataType: "string";
|
|
298
|
+
columnType: "PgText";
|
|
299
|
+
data: string;
|
|
300
|
+
driverParam: string;
|
|
301
|
+
notNull: true;
|
|
302
|
+
hasDefault: false;
|
|
303
|
+
isPrimaryKey: false;
|
|
304
|
+
isAutoincrement: false;
|
|
305
|
+
hasRuntimeDefault: false;
|
|
306
|
+
enumValues: [string, ...string[]];
|
|
307
|
+
baseColumn: never;
|
|
308
|
+
identity: undefined;
|
|
309
|
+
generated: undefined;
|
|
310
|
+
}, {}, {}>;
|
|
311
|
+
kind: import("drizzle-orm/pg-core").PgColumn<{
|
|
312
|
+
name: "kind";
|
|
313
|
+
tableName: "mice_session_inclusions";
|
|
314
|
+
dataType: "string";
|
|
315
|
+
columnType: "PgEnumColumn";
|
|
316
|
+
data: "other" | "fnb" | "av" | "materials" | "signage";
|
|
317
|
+
driverParam: string;
|
|
318
|
+
notNull: true;
|
|
319
|
+
hasDefault: false;
|
|
320
|
+
isPrimaryKey: false;
|
|
321
|
+
isAutoincrement: false;
|
|
322
|
+
hasRuntimeDefault: false;
|
|
323
|
+
enumValues: ["fnb", "av", "materials", "signage", "other"];
|
|
324
|
+
baseColumn: never;
|
|
325
|
+
identity: undefined;
|
|
326
|
+
generated: undefined;
|
|
327
|
+
}, {}, {}>;
|
|
328
|
+
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
329
|
+
name: "description";
|
|
330
|
+
tableName: "mice_session_inclusions";
|
|
331
|
+
dataType: "string";
|
|
332
|
+
columnType: "PgText";
|
|
333
|
+
data: string;
|
|
334
|
+
driverParam: string;
|
|
335
|
+
notNull: false;
|
|
336
|
+
hasDefault: false;
|
|
337
|
+
isPrimaryKey: false;
|
|
338
|
+
isAutoincrement: false;
|
|
339
|
+
hasRuntimeDefault: false;
|
|
340
|
+
enumValues: [string, ...string[]];
|
|
341
|
+
baseColumn: never;
|
|
342
|
+
identity: undefined;
|
|
343
|
+
generated: undefined;
|
|
344
|
+
}, {}, {}>;
|
|
345
|
+
quantity: import("drizzle-orm/pg-core").PgColumn<{
|
|
346
|
+
name: "quantity";
|
|
347
|
+
tableName: "mice_session_inclusions";
|
|
348
|
+
dataType: "number";
|
|
349
|
+
columnType: "PgInteger";
|
|
350
|
+
data: number;
|
|
351
|
+
driverParam: string | number;
|
|
352
|
+
notNull: true;
|
|
353
|
+
hasDefault: true;
|
|
354
|
+
isPrimaryKey: false;
|
|
355
|
+
isAutoincrement: false;
|
|
356
|
+
hasRuntimeDefault: false;
|
|
357
|
+
enumValues: undefined;
|
|
358
|
+
baseColumn: never;
|
|
359
|
+
identity: undefined;
|
|
360
|
+
generated: undefined;
|
|
361
|
+
}, {}, {}>;
|
|
362
|
+
costAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
363
|
+
name: "cost_amount_cents";
|
|
364
|
+
tableName: "mice_session_inclusions";
|
|
365
|
+
dataType: "number";
|
|
366
|
+
columnType: "PgInteger";
|
|
367
|
+
data: number;
|
|
368
|
+
driverParam: string | number;
|
|
369
|
+
notNull: false;
|
|
370
|
+
hasDefault: false;
|
|
371
|
+
isPrimaryKey: false;
|
|
372
|
+
isAutoincrement: false;
|
|
373
|
+
hasRuntimeDefault: false;
|
|
374
|
+
enumValues: undefined;
|
|
375
|
+
baseColumn: never;
|
|
376
|
+
identity: undefined;
|
|
377
|
+
generated: undefined;
|
|
378
|
+
}, {}, {}>;
|
|
379
|
+
currency: import("drizzle-orm/pg-core").PgColumn<{
|
|
380
|
+
name: "currency";
|
|
381
|
+
tableName: "mice_session_inclusions";
|
|
382
|
+
dataType: "string";
|
|
383
|
+
columnType: "PgText";
|
|
384
|
+
data: string;
|
|
385
|
+
driverParam: string;
|
|
386
|
+
notNull: false;
|
|
387
|
+
hasDefault: false;
|
|
388
|
+
isPrimaryKey: false;
|
|
389
|
+
isAutoincrement: false;
|
|
390
|
+
hasRuntimeDefault: false;
|
|
391
|
+
enumValues: [string, ...string[]];
|
|
392
|
+
baseColumn: never;
|
|
393
|
+
identity: undefined;
|
|
394
|
+
generated: undefined;
|
|
395
|
+
}, {}, {}>;
|
|
396
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
397
|
+
name: "created_at";
|
|
398
|
+
tableName: "mice_session_inclusions";
|
|
399
|
+
dataType: "date";
|
|
400
|
+
columnType: "PgTimestamp";
|
|
401
|
+
data: Date;
|
|
402
|
+
driverParam: string;
|
|
403
|
+
notNull: true;
|
|
404
|
+
hasDefault: true;
|
|
405
|
+
isPrimaryKey: false;
|
|
406
|
+
isAutoincrement: false;
|
|
407
|
+
hasRuntimeDefault: false;
|
|
408
|
+
enumValues: undefined;
|
|
409
|
+
baseColumn: never;
|
|
410
|
+
identity: undefined;
|
|
411
|
+
generated: undefined;
|
|
412
|
+
}, {}, {}>;
|
|
413
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
414
|
+
name: "updated_at";
|
|
415
|
+
tableName: "mice_session_inclusions";
|
|
416
|
+
dataType: "date";
|
|
417
|
+
columnType: "PgTimestamp";
|
|
418
|
+
data: Date;
|
|
419
|
+
driverParam: string;
|
|
420
|
+
notNull: true;
|
|
421
|
+
hasDefault: true;
|
|
422
|
+
isPrimaryKey: false;
|
|
423
|
+
isAutoincrement: false;
|
|
424
|
+
hasRuntimeDefault: false;
|
|
425
|
+
enumValues: undefined;
|
|
426
|
+
baseColumn: never;
|
|
427
|
+
identity: undefined;
|
|
428
|
+
generated: undefined;
|
|
429
|
+
}, {}, {}>;
|
|
430
|
+
};
|
|
431
|
+
dialect: "pg";
|
|
432
|
+
}>;
|
|
433
|
+
export type ProgramSession = typeof programSessions.$inferSelect;
|
|
434
|
+
export type NewProgramSession = typeof programSessions.$inferInsert;
|
|
435
|
+
export type SessionInclusion = typeof sessionInclusions.$inferSelect;
|
|
436
|
+
export type NewSessionInclusion = typeof sessionInclusions.$inferInsert;
|
|
437
|
+
//# sourceMappingURL=schema-sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-sessions.d.ts","sourceRoot":"","sources":["../src/schema-sessions.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,kHAQ1B,CAAA;AAEF,eAAO,MAAM,wBAAwB,sFAMnC,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6B3B,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB7B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC,YAAY,CAAA;AAChE,MAAM,MAAM,iBAAiB,GAAG,OAAO,eAAe,CAAC,YAAY,CAAA;AACnE,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AACpE,MAAM,MAAM,mBAAmB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { typeId, typeIdRef } from "@voyant-travel/db/lib/typeid-column";
|
|
2
|
+
import { boolean, date, index, integer, jsonb, pgEnum, pgTable, text, timestamp, } from "drizzle-orm/pg-core";
|
|
3
|
+
import { programs } from "./schema.js";
|
|
4
|
+
/**
|
|
5
|
+
* Program agenda — timed, capacity-bound sessions (keynote → breakouts → gala)
|
|
6
|
+
* and their inclusions (F&B, AV, materials, signage). This is the model the
|
|
7
|
+
* gap analysis found missing: product itineraries carry service/cost/quantity
|
|
8
|
+
* but no start/end/capacity. See RFC voyant#1489 (Phase 2).
|
|
9
|
+
*/
|
|
10
|
+
export const sessionTypeEnum = pgEnum("mice_session_type", [
|
|
11
|
+
"keynote",
|
|
12
|
+
"breakout",
|
|
13
|
+
"meal",
|
|
14
|
+
"networking",
|
|
15
|
+
"gala",
|
|
16
|
+
"excursion",
|
|
17
|
+
"free",
|
|
18
|
+
]);
|
|
19
|
+
export const sessionInclusionKindEnum = pgEnum("mice_session_inclusion_kind", [
|
|
20
|
+
"fnb",
|
|
21
|
+
"av",
|
|
22
|
+
"materials",
|
|
23
|
+
"signage",
|
|
24
|
+
"other",
|
|
25
|
+
]);
|
|
26
|
+
export const programSessions = pgTable("mice_program_sessions", {
|
|
27
|
+
id: typeId("mice_program_sessions"),
|
|
28
|
+
// Intra-package FK (sessions + programs both live in mice):
|
|
29
|
+
programId: typeIdRef("program_id")
|
|
30
|
+
.notNull()
|
|
31
|
+
.references(() => programs.id, { onDelete: "cascade" }),
|
|
32
|
+
// Cross-package → loose column + defineLink at the deployment:
|
|
33
|
+
functionSpaceId: typeIdRef("function_space_id"), // → operations.functionSpaces
|
|
34
|
+
title: text("title").notNull(),
|
|
35
|
+
sessionType: sessionTypeEnum("session_type").notNull().default("breakout"),
|
|
36
|
+
dayDate: date("day_date"),
|
|
37
|
+
startsAt: timestamp("starts_at", { withTimezone: true }),
|
|
38
|
+
endsAt: timestamp("ends_at", { withTimezone: true }),
|
|
39
|
+
track: text("track"),
|
|
40
|
+
capacity: integer("capacity"),
|
|
41
|
+
requiresRegistration: boolean("requires_registration").notNull().default(false),
|
|
42
|
+
notes: text("notes"),
|
|
43
|
+
metadata: jsonb("metadata").$type(),
|
|
44
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
45
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
46
|
+
}, (table) => [
|
|
47
|
+
index("idx_mice_program_sessions_program").on(table.programId),
|
|
48
|
+
index("idx_mice_program_sessions_program_day").on(table.programId, table.dayDate),
|
|
49
|
+
index("idx_mice_program_sessions_function_space").on(table.functionSpaceId),
|
|
50
|
+
index("idx_mice_program_sessions_starts_at").on(table.startsAt),
|
|
51
|
+
]);
|
|
52
|
+
export const sessionInclusions = pgTable("mice_session_inclusions", {
|
|
53
|
+
id: typeId("mice_session_inclusions"),
|
|
54
|
+
sessionId: typeIdRef("session_id")
|
|
55
|
+
.notNull()
|
|
56
|
+
.references(() => programSessions.id, { onDelete: "cascade" }),
|
|
57
|
+
kind: sessionInclusionKindEnum("kind").notNull(),
|
|
58
|
+
description: text("description"),
|
|
59
|
+
quantity: integer("quantity").notNull().default(1),
|
|
60
|
+
costAmountCents: integer("cost_amount_cents"),
|
|
61
|
+
currency: text("currency"),
|
|
62
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
63
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
64
|
+
}, (table) => [index("idx_mice_session_inclusions_session").on(table.sessionId)]);
|