feat: add option to link Google Maps to events

This commit is contained in:
Levente Orban
2025-09-24 21:15:31 +02:00
parent 69a760d3f1
commit cc3c868f7d
14 changed files with 353 additions and 93 deletions

View File

@@ -17,6 +17,7 @@ import type { InferInsertModel, InferSelectModel } from 'drizzle-orm';
// --- Enums (matching the SQL CHECK constraints)
export const eventTypeEnum = pgEnum('event_type', ['limited', 'unlimited']);
export const visibilityEnum = pgEnum('visibility', ['public', 'private']);
export const locationTypeEnum = pgEnum('location_type', ['text', 'maps']);
// --- Events table
export const events = pgTable(
@@ -27,6 +28,8 @@ export const events = pgTable(
date: date('date', { mode: 'string' }).notNull(), // ISO 'YYYY-MM-DD'
time: time('time', { withTimezone: false }).notNull(), // 'HH:MM:SS'
location: varchar('location', { length: 200 }).notNull(),
locationType: locationTypeEnum('location_type').notNull().default('text'),
locationUrl: varchar('location_url', { length: 500 }),
type: eventTypeEnum('type').notNull(),
attendeeLimit: integer('attendee_limit'), // nullable in SQL
userId: varchar('user_id', { length: 100 }).notNull(),