@voyantjs/bookings 0.2.0 → 0.3.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.
@@ -0,0 +1,600 @@
1
+ export declare const bookingSupplierStatuses: import("drizzle-orm/pg-core").PgTableWithColumns<{
2
+ name: "booking_supplier_statuses";
3
+ schema: undefined;
4
+ columns: {
5
+ id: import("drizzle-orm/pg-core").PgColumn<{
6
+ name: string;
7
+ tableName: "booking_supplier_statuses";
8
+ dataType: "string";
9
+ columnType: "PgText";
10
+ data: string;
11
+ driverParam: string;
12
+ notNull: true;
13
+ hasDefault: true;
14
+ isPrimaryKey: true;
15
+ isAutoincrement: false;
16
+ hasRuntimeDefault: true;
17
+ enumValues: [string, ...string[]];
18
+ baseColumn: never;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }, {}, {}>;
22
+ bookingId: import("drizzle-orm/pg-core").PgColumn<{
23
+ name: string;
24
+ tableName: "booking_supplier_statuses";
25
+ dataType: "string";
26
+ columnType: "PgText";
27
+ data: string;
28
+ driverParam: string;
29
+ notNull: true;
30
+ hasDefault: false;
31
+ isPrimaryKey: false;
32
+ isAutoincrement: false;
33
+ hasRuntimeDefault: false;
34
+ enumValues: [string, ...string[]];
35
+ baseColumn: never;
36
+ identity: undefined;
37
+ generated: undefined;
38
+ }, {}, {}>;
39
+ supplierServiceId: import("drizzle-orm/pg-core").PgColumn<{
40
+ name: "supplier_service_id";
41
+ tableName: "booking_supplier_statuses";
42
+ dataType: "string";
43
+ columnType: "PgText";
44
+ data: string;
45
+ driverParam: string;
46
+ notNull: false;
47
+ hasDefault: false;
48
+ isPrimaryKey: false;
49
+ isAutoincrement: false;
50
+ hasRuntimeDefault: false;
51
+ enumValues: [string, ...string[]];
52
+ baseColumn: never;
53
+ identity: undefined;
54
+ generated: undefined;
55
+ }, {}, {}>;
56
+ serviceName: import("drizzle-orm/pg-core").PgColumn<{
57
+ name: "service_name";
58
+ tableName: "booking_supplier_statuses";
59
+ dataType: "string";
60
+ columnType: "PgText";
61
+ data: string;
62
+ driverParam: string;
63
+ notNull: true;
64
+ hasDefault: false;
65
+ isPrimaryKey: false;
66
+ isAutoincrement: false;
67
+ hasRuntimeDefault: false;
68
+ enumValues: [string, ...string[]];
69
+ baseColumn: never;
70
+ identity: undefined;
71
+ generated: undefined;
72
+ }, {}, {}>;
73
+ status: import("drizzle-orm/pg-core").PgColumn<{
74
+ name: "status";
75
+ tableName: "booking_supplier_statuses";
76
+ dataType: "string";
77
+ columnType: "PgEnumColumn";
78
+ data: "cancelled" | "confirmed" | "pending" | "rejected";
79
+ driverParam: string;
80
+ notNull: true;
81
+ hasDefault: true;
82
+ isPrimaryKey: false;
83
+ isAutoincrement: false;
84
+ hasRuntimeDefault: false;
85
+ enumValues: ["pending", "confirmed", "rejected", "cancelled"];
86
+ baseColumn: never;
87
+ identity: undefined;
88
+ generated: undefined;
89
+ }, {}, {}>;
90
+ supplierReference: import("drizzle-orm/pg-core").PgColumn<{
91
+ name: "supplier_reference";
92
+ tableName: "booking_supplier_statuses";
93
+ dataType: "string";
94
+ columnType: "PgText";
95
+ data: string;
96
+ driverParam: string;
97
+ notNull: false;
98
+ hasDefault: false;
99
+ isPrimaryKey: false;
100
+ isAutoincrement: false;
101
+ hasRuntimeDefault: false;
102
+ enumValues: [string, ...string[]];
103
+ baseColumn: never;
104
+ identity: undefined;
105
+ generated: undefined;
106
+ }, {}, {}>;
107
+ costCurrency: import("drizzle-orm/pg-core").PgColumn<{
108
+ name: "cost_currency";
109
+ tableName: "booking_supplier_statuses";
110
+ dataType: "string";
111
+ columnType: "PgText";
112
+ data: string;
113
+ driverParam: string;
114
+ notNull: true;
115
+ hasDefault: false;
116
+ isPrimaryKey: false;
117
+ isAutoincrement: false;
118
+ hasRuntimeDefault: false;
119
+ enumValues: [string, ...string[]];
120
+ baseColumn: never;
121
+ identity: undefined;
122
+ generated: undefined;
123
+ }, {}, {}>;
124
+ costAmountCents: import("drizzle-orm/pg-core").PgColumn<{
125
+ name: "cost_amount_cents";
126
+ tableName: "booking_supplier_statuses";
127
+ dataType: "number";
128
+ columnType: "PgInteger";
129
+ data: number;
130
+ driverParam: string | number;
131
+ notNull: true;
132
+ hasDefault: false;
133
+ isPrimaryKey: false;
134
+ isAutoincrement: false;
135
+ hasRuntimeDefault: false;
136
+ enumValues: undefined;
137
+ baseColumn: never;
138
+ identity: undefined;
139
+ generated: undefined;
140
+ }, {}, {}>;
141
+ notes: import("drizzle-orm/pg-core").PgColumn<{
142
+ name: "notes";
143
+ tableName: "booking_supplier_statuses";
144
+ dataType: "string";
145
+ columnType: "PgText";
146
+ data: string;
147
+ driverParam: string;
148
+ notNull: false;
149
+ hasDefault: false;
150
+ isPrimaryKey: false;
151
+ isAutoincrement: false;
152
+ hasRuntimeDefault: false;
153
+ enumValues: [string, ...string[]];
154
+ baseColumn: never;
155
+ identity: undefined;
156
+ generated: undefined;
157
+ }, {}, {}>;
158
+ confirmedAt: import("drizzle-orm/pg-core").PgColumn<{
159
+ name: "confirmed_at";
160
+ tableName: "booking_supplier_statuses";
161
+ dataType: "date";
162
+ columnType: "PgTimestamp";
163
+ data: Date;
164
+ driverParam: string;
165
+ notNull: false;
166
+ hasDefault: false;
167
+ isPrimaryKey: false;
168
+ isAutoincrement: false;
169
+ hasRuntimeDefault: false;
170
+ enumValues: undefined;
171
+ baseColumn: never;
172
+ identity: undefined;
173
+ generated: undefined;
174
+ }, {}, {}>;
175
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
176
+ name: "created_at";
177
+ tableName: "booking_supplier_statuses";
178
+ dataType: "date";
179
+ columnType: "PgTimestamp";
180
+ data: Date;
181
+ driverParam: string;
182
+ notNull: true;
183
+ hasDefault: true;
184
+ isPrimaryKey: false;
185
+ isAutoincrement: false;
186
+ hasRuntimeDefault: false;
187
+ enumValues: undefined;
188
+ baseColumn: never;
189
+ identity: undefined;
190
+ generated: undefined;
191
+ }, {}, {}>;
192
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
193
+ name: "updated_at";
194
+ tableName: "booking_supplier_statuses";
195
+ dataType: "date";
196
+ columnType: "PgTimestamp";
197
+ data: Date;
198
+ driverParam: string;
199
+ notNull: true;
200
+ hasDefault: true;
201
+ isPrimaryKey: false;
202
+ isAutoincrement: false;
203
+ hasRuntimeDefault: false;
204
+ enumValues: undefined;
205
+ baseColumn: never;
206
+ identity: undefined;
207
+ generated: undefined;
208
+ }, {}, {}>;
209
+ };
210
+ dialect: "pg";
211
+ }>;
212
+ export declare const bookingActivityLog: import("drizzle-orm/pg-core").PgTableWithColumns<{
213
+ name: "booking_activity_log";
214
+ schema: undefined;
215
+ columns: {
216
+ id: import("drizzle-orm/pg-core").PgColumn<{
217
+ name: string;
218
+ tableName: "booking_activity_log";
219
+ dataType: "string";
220
+ columnType: "PgText";
221
+ data: string;
222
+ driverParam: string;
223
+ notNull: true;
224
+ hasDefault: true;
225
+ isPrimaryKey: true;
226
+ isAutoincrement: false;
227
+ hasRuntimeDefault: true;
228
+ enumValues: [string, ...string[]];
229
+ baseColumn: never;
230
+ identity: undefined;
231
+ generated: undefined;
232
+ }, {}, {}>;
233
+ bookingId: import("drizzle-orm/pg-core").PgColumn<{
234
+ name: string;
235
+ tableName: "booking_activity_log";
236
+ dataType: "string";
237
+ columnType: "PgText";
238
+ data: string;
239
+ driverParam: string;
240
+ notNull: true;
241
+ hasDefault: false;
242
+ isPrimaryKey: false;
243
+ isAutoincrement: false;
244
+ hasRuntimeDefault: false;
245
+ enumValues: [string, ...string[]];
246
+ baseColumn: never;
247
+ identity: undefined;
248
+ generated: undefined;
249
+ }, {}, {}>;
250
+ actorId: import("drizzle-orm/pg-core").PgColumn<{
251
+ name: "actor_id";
252
+ tableName: "booking_activity_log";
253
+ dataType: "string";
254
+ columnType: "PgText";
255
+ data: string;
256
+ driverParam: string;
257
+ notNull: false;
258
+ hasDefault: false;
259
+ isPrimaryKey: false;
260
+ isAutoincrement: false;
261
+ hasRuntimeDefault: false;
262
+ enumValues: [string, ...string[]];
263
+ baseColumn: never;
264
+ identity: undefined;
265
+ generated: undefined;
266
+ }, {}, {}>;
267
+ activityType: import("drizzle-orm/pg-core").PgColumn<{
268
+ name: "activity_type";
269
+ tableName: "booking_activity_log";
270
+ dataType: "string";
271
+ columnType: "PgEnumColumn";
272
+ data: "booking_created" | "booking_reserved" | "booking_converted" | "booking_confirmed" | "hold_extended" | "hold_expired" | "status_change" | "item_update" | "allocation_released" | "fulfillment_issued" | "fulfillment_updated" | "redemption_recorded" | "supplier_update" | "passenger_update" | "note_added";
273
+ driverParam: string;
274
+ notNull: true;
275
+ hasDefault: false;
276
+ isPrimaryKey: false;
277
+ isAutoincrement: false;
278
+ hasRuntimeDefault: false;
279
+ enumValues: ["booking_created", "booking_reserved", "booking_converted", "booking_confirmed", "hold_extended", "hold_expired", "status_change", "item_update", "allocation_released", "fulfillment_issued", "fulfillment_updated", "redemption_recorded", "supplier_update", "passenger_update", "note_added"];
280
+ baseColumn: never;
281
+ identity: undefined;
282
+ generated: undefined;
283
+ }, {}, {}>;
284
+ description: import("drizzle-orm/pg-core").PgColumn<{
285
+ name: "description";
286
+ tableName: "booking_activity_log";
287
+ dataType: "string";
288
+ columnType: "PgText";
289
+ data: string;
290
+ driverParam: string;
291
+ notNull: true;
292
+ hasDefault: false;
293
+ isPrimaryKey: false;
294
+ isAutoincrement: false;
295
+ hasRuntimeDefault: false;
296
+ enumValues: [string, ...string[]];
297
+ baseColumn: never;
298
+ identity: undefined;
299
+ generated: undefined;
300
+ }, {}, {}>;
301
+ metadata: import("drizzle-orm/pg-core").PgColumn<{
302
+ name: "metadata";
303
+ tableName: "booking_activity_log";
304
+ dataType: "json";
305
+ columnType: "PgJsonb";
306
+ data: Record<string, unknown>;
307
+ driverParam: unknown;
308
+ notNull: false;
309
+ hasDefault: false;
310
+ isPrimaryKey: false;
311
+ isAutoincrement: false;
312
+ hasRuntimeDefault: false;
313
+ enumValues: undefined;
314
+ baseColumn: never;
315
+ identity: undefined;
316
+ generated: undefined;
317
+ }, {}, {
318
+ $type: Record<string, unknown>;
319
+ }>;
320
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
321
+ name: "created_at";
322
+ tableName: "booking_activity_log";
323
+ dataType: "date";
324
+ columnType: "PgTimestamp";
325
+ data: Date;
326
+ driverParam: string;
327
+ notNull: true;
328
+ hasDefault: true;
329
+ isPrimaryKey: false;
330
+ isAutoincrement: false;
331
+ hasRuntimeDefault: false;
332
+ enumValues: undefined;
333
+ baseColumn: never;
334
+ identity: undefined;
335
+ generated: undefined;
336
+ }, {}, {}>;
337
+ };
338
+ dialect: "pg";
339
+ }>;
340
+ export declare const bookingNotes: import("drizzle-orm/pg-core").PgTableWithColumns<{
341
+ name: "booking_notes";
342
+ schema: undefined;
343
+ columns: {
344
+ id: import("drizzle-orm/pg-core").PgColumn<{
345
+ name: string;
346
+ tableName: "booking_notes";
347
+ dataType: "string";
348
+ columnType: "PgText";
349
+ data: string;
350
+ driverParam: string;
351
+ notNull: true;
352
+ hasDefault: true;
353
+ isPrimaryKey: true;
354
+ isAutoincrement: false;
355
+ hasRuntimeDefault: true;
356
+ enumValues: [string, ...string[]];
357
+ baseColumn: never;
358
+ identity: undefined;
359
+ generated: undefined;
360
+ }, {}, {}>;
361
+ bookingId: import("drizzle-orm/pg-core").PgColumn<{
362
+ name: string;
363
+ tableName: "booking_notes";
364
+ dataType: "string";
365
+ columnType: "PgText";
366
+ data: string;
367
+ driverParam: string;
368
+ notNull: true;
369
+ hasDefault: false;
370
+ isPrimaryKey: false;
371
+ isAutoincrement: false;
372
+ hasRuntimeDefault: false;
373
+ enumValues: [string, ...string[]];
374
+ baseColumn: never;
375
+ identity: undefined;
376
+ generated: undefined;
377
+ }, {}, {}>;
378
+ authorId: import("drizzle-orm/pg-core").PgColumn<{
379
+ name: "author_id";
380
+ tableName: "booking_notes";
381
+ dataType: "string";
382
+ columnType: "PgText";
383
+ data: string;
384
+ driverParam: string;
385
+ notNull: true;
386
+ hasDefault: false;
387
+ isPrimaryKey: false;
388
+ isAutoincrement: false;
389
+ hasRuntimeDefault: false;
390
+ enumValues: [string, ...string[]];
391
+ baseColumn: never;
392
+ identity: undefined;
393
+ generated: undefined;
394
+ }, {}, {}>;
395
+ content: import("drizzle-orm/pg-core").PgColumn<{
396
+ name: "content";
397
+ tableName: "booking_notes";
398
+ dataType: "string";
399
+ columnType: "PgText";
400
+ data: string;
401
+ driverParam: string;
402
+ notNull: true;
403
+ hasDefault: false;
404
+ isPrimaryKey: false;
405
+ isAutoincrement: false;
406
+ hasRuntimeDefault: false;
407
+ enumValues: [string, ...string[]];
408
+ baseColumn: never;
409
+ identity: undefined;
410
+ generated: undefined;
411
+ }, {}, {}>;
412
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
413
+ name: "created_at";
414
+ tableName: "booking_notes";
415
+ dataType: "date";
416
+ columnType: "PgTimestamp";
417
+ data: Date;
418
+ driverParam: string;
419
+ notNull: true;
420
+ hasDefault: true;
421
+ isPrimaryKey: false;
422
+ isAutoincrement: false;
423
+ hasRuntimeDefault: false;
424
+ enumValues: undefined;
425
+ baseColumn: never;
426
+ identity: undefined;
427
+ generated: undefined;
428
+ }, {}, {}>;
429
+ };
430
+ dialect: "pg";
431
+ }>;
432
+ export declare const bookingDocuments: import("drizzle-orm/pg-core").PgTableWithColumns<{
433
+ name: "booking_documents";
434
+ schema: undefined;
435
+ columns: {
436
+ id: import("drizzle-orm/pg-core").PgColumn<{
437
+ name: string;
438
+ tableName: "booking_documents";
439
+ dataType: "string";
440
+ columnType: "PgText";
441
+ data: string;
442
+ driverParam: string;
443
+ notNull: true;
444
+ hasDefault: true;
445
+ isPrimaryKey: true;
446
+ isAutoincrement: false;
447
+ hasRuntimeDefault: true;
448
+ enumValues: [string, ...string[]];
449
+ baseColumn: never;
450
+ identity: undefined;
451
+ generated: undefined;
452
+ }, {}, {}>;
453
+ bookingId: import("drizzle-orm/pg-core").PgColumn<{
454
+ name: string;
455
+ tableName: "booking_documents";
456
+ dataType: "string";
457
+ columnType: "PgText";
458
+ data: string;
459
+ driverParam: string;
460
+ notNull: true;
461
+ hasDefault: false;
462
+ isPrimaryKey: false;
463
+ isAutoincrement: false;
464
+ hasRuntimeDefault: false;
465
+ enumValues: [string, ...string[]];
466
+ baseColumn: never;
467
+ identity: undefined;
468
+ generated: undefined;
469
+ }, {}, {}>;
470
+ participantId: import("drizzle-orm/pg-core").PgColumn<{
471
+ name: string;
472
+ tableName: "booking_documents";
473
+ dataType: "string";
474
+ columnType: "PgText";
475
+ data: string;
476
+ driverParam: string;
477
+ notNull: false;
478
+ hasDefault: false;
479
+ isPrimaryKey: false;
480
+ isAutoincrement: false;
481
+ hasRuntimeDefault: false;
482
+ enumValues: [string, ...string[]];
483
+ baseColumn: never;
484
+ identity: undefined;
485
+ generated: undefined;
486
+ }, {}, {}>;
487
+ type: import("drizzle-orm/pg-core").PgColumn<{
488
+ name: "type";
489
+ tableName: "booking_documents";
490
+ dataType: "string";
491
+ columnType: "PgEnumColumn";
492
+ data: "visa" | "other" | "insurance" | "health" | "passport_copy";
493
+ driverParam: string;
494
+ notNull: true;
495
+ hasDefault: false;
496
+ isPrimaryKey: false;
497
+ isAutoincrement: false;
498
+ hasRuntimeDefault: false;
499
+ enumValues: ["visa", "insurance", "health", "passport_copy", "other"];
500
+ baseColumn: never;
501
+ identity: undefined;
502
+ generated: undefined;
503
+ }, {}, {}>;
504
+ fileName: import("drizzle-orm/pg-core").PgColumn<{
505
+ name: "file_name";
506
+ tableName: "booking_documents";
507
+ dataType: "string";
508
+ columnType: "PgText";
509
+ data: string;
510
+ driverParam: string;
511
+ notNull: true;
512
+ hasDefault: false;
513
+ isPrimaryKey: false;
514
+ isAutoincrement: false;
515
+ hasRuntimeDefault: false;
516
+ enumValues: [string, ...string[]];
517
+ baseColumn: never;
518
+ identity: undefined;
519
+ generated: undefined;
520
+ }, {}, {}>;
521
+ fileUrl: import("drizzle-orm/pg-core").PgColumn<{
522
+ name: "file_url";
523
+ tableName: "booking_documents";
524
+ dataType: "string";
525
+ columnType: "PgText";
526
+ data: string;
527
+ driverParam: string;
528
+ notNull: true;
529
+ hasDefault: false;
530
+ isPrimaryKey: false;
531
+ isAutoincrement: false;
532
+ hasRuntimeDefault: false;
533
+ enumValues: [string, ...string[]];
534
+ baseColumn: never;
535
+ identity: undefined;
536
+ generated: undefined;
537
+ }, {}, {}>;
538
+ expiresAt: import("drizzle-orm/pg-core").PgColumn<{
539
+ name: "expires_at";
540
+ tableName: "booking_documents";
541
+ dataType: "date";
542
+ columnType: "PgTimestamp";
543
+ data: Date;
544
+ driverParam: string;
545
+ notNull: false;
546
+ hasDefault: false;
547
+ isPrimaryKey: false;
548
+ isAutoincrement: false;
549
+ hasRuntimeDefault: false;
550
+ enumValues: undefined;
551
+ baseColumn: never;
552
+ identity: undefined;
553
+ generated: undefined;
554
+ }, {}, {}>;
555
+ notes: import("drizzle-orm/pg-core").PgColumn<{
556
+ name: "notes";
557
+ tableName: "booking_documents";
558
+ dataType: "string";
559
+ columnType: "PgText";
560
+ data: string;
561
+ driverParam: string;
562
+ notNull: false;
563
+ hasDefault: false;
564
+ isPrimaryKey: false;
565
+ isAutoincrement: false;
566
+ hasRuntimeDefault: false;
567
+ enumValues: [string, ...string[]];
568
+ baseColumn: never;
569
+ identity: undefined;
570
+ generated: undefined;
571
+ }, {}, {}>;
572
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
573
+ name: "created_at";
574
+ tableName: "booking_documents";
575
+ dataType: "date";
576
+ columnType: "PgTimestamp";
577
+ data: Date;
578
+ driverParam: string;
579
+ notNull: true;
580
+ hasDefault: true;
581
+ isPrimaryKey: false;
582
+ isAutoincrement: false;
583
+ hasRuntimeDefault: false;
584
+ enumValues: undefined;
585
+ baseColumn: never;
586
+ identity: undefined;
587
+ generated: undefined;
588
+ }, {}, {}>;
589
+ };
590
+ dialect: "pg";
591
+ }>;
592
+ export type BookingSupplierStatus = typeof bookingSupplierStatuses.$inferSelect;
593
+ export type NewBookingSupplierStatus = typeof bookingSupplierStatuses.$inferInsert;
594
+ export type BookingActivity = typeof bookingActivityLog.$inferSelect;
595
+ export type NewBookingActivity = typeof bookingActivityLog.$inferInsert;
596
+ export type BookingNote = typeof bookingNotes.$inferSelect;
597
+ export type NewBookingNote = typeof bookingNotes.$inferInsert;
598
+ export type BookingDocument = typeof bookingDocuments.$inferSelect;
599
+ export type NewBookingDocument = typeof bookingDocuments.$inferInsert;
600
+ //# sourceMappingURL=schema-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-operations.d.ts","sourceRoot":"","sources":["../src/schema-operations.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBnC,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9B,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYxB,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB5B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,uBAAuB,CAAC,YAAY,CAAA;AAC/E,MAAM,MAAM,wBAAwB,GAAG,OAAO,uBAAuB,CAAC,YAAY,CAAA;AAClF,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,YAAY,CAAA;AACpE,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,YAAY,CAAA;AACvE,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC,YAAY,CAAA;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,YAAY,CAAC,YAAY,CAAA;AAC7D,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA;AAClE,MAAM,MAAM,kBAAkB,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA"}
@@ -0,0 +1,61 @@
1
+ import { typeId, typeIdRef } from "@voyantjs/db/lib/typeid-column";
2
+ import { index, integer, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
3
+ import { bookingParticipants, bookings } from "./schema-core";
4
+ import { bookingActivityTypeEnum, bookingDocumentTypeEnum, supplierConfirmationStatusEnum, } from "./schema-shared";
5
+ export const bookingSupplierStatuses = pgTable("booking_supplier_statuses", {
6
+ id: typeId("booking_supplier_statuses"),
7
+ bookingId: typeIdRef("booking_id")
8
+ .notNull()
9
+ .references(() => bookings.id, { onDelete: "cascade" }),
10
+ supplierServiceId: text("supplier_service_id"),
11
+ serviceName: text("service_name").notNull(),
12
+ status: supplierConfirmationStatusEnum("status").notNull().default("pending"),
13
+ supplierReference: text("supplier_reference"),
14
+ costCurrency: text("cost_currency").notNull(),
15
+ costAmountCents: integer("cost_amount_cents").notNull(),
16
+ notes: text("notes"),
17
+ confirmedAt: timestamp("confirmed_at", { withTimezone: true }),
18
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
19
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
20
+ }, (table) => [
21
+ index("idx_booking_supplier_statuses_booking").on(table.bookingId),
22
+ index("idx_booking_supplier_statuses_service").on(table.supplierServiceId),
23
+ ]);
24
+ export const bookingActivityLog = pgTable("booking_activity_log", {
25
+ id: typeId("booking_activity_log"),
26
+ bookingId: typeIdRef("booking_id")
27
+ .notNull()
28
+ .references(() => bookings.id, { onDelete: "cascade" }),
29
+ actorId: text("actor_id"),
30
+ activityType: bookingActivityTypeEnum("activity_type").notNull(),
31
+ description: text("description").notNull(),
32
+ metadata: jsonb("metadata").$type(),
33
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
34
+ }, (table) => [index("idx_booking_activity_log_booking").on(table.bookingId)]);
35
+ export const bookingNotes = pgTable("booking_notes", {
36
+ id: typeId("booking_notes"),
37
+ bookingId: typeIdRef("booking_id")
38
+ .notNull()
39
+ .references(() => bookings.id, { onDelete: "cascade" }),
40
+ authorId: text("author_id").notNull(),
41
+ content: text("content").notNull(),
42
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
43
+ }, (table) => [index("idx_booking_notes_booking").on(table.bookingId)]);
44
+ export const bookingDocuments = pgTable("booking_documents", {
45
+ id: typeId("booking_documents"),
46
+ bookingId: typeIdRef("booking_id")
47
+ .notNull()
48
+ .references(() => bookings.id, { onDelete: "cascade" }),
49
+ participantId: typeIdRef("participant_id").references(() => bookingParticipants.id, {
50
+ onDelete: "set null",
51
+ }),
52
+ type: bookingDocumentTypeEnum("type").notNull(),
53
+ fileName: text("file_name").notNull(),
54
+ fileUrl: text("file_url").notNull(),
55
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
56
+ notes: text("notes"),
57
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
58
+ }, (table) => [
59
+ index("idx_booking_documents_booking").on(table.bookingId),
60
+ index("idx_booking_documents_participant").on(table.participantId),
61
+ ]);