chore: Add tripId field to Adventure interface and schema

This commit is contained in:
Sean Morley
2024-05-15 21:06:01 +00:00
parent a0400bca8e
commit b94fdc7107
6 changed files with 544 additions and 3 deletions

View File

@@ -91,7 +91,6 @@ export const userPlannedTrips = pgTable("userPlannedTrips", {
description: text("description"),
startDate: text("startDate"),
endDate: text("endDate"),
adventures: json("adventures"),
});
export const adventureTable = pgTable("adventures", {
@@ -106,4 +105,5 @@ export const adventureTable = pgTable("adventures", {
link: text("link"),
imageUrl: text("imageUrl"),
date: text("date"),
tripId: integer("tripId").references(() => userPlannedTrips.id),
});

View File

@@ -9,6 +9,7 @@ export interface Adventure {
link?: string | undefined;
imageUrl?: string | undefined;
date?: string | undefined;
tripId?: number | undefined;
}
export interface Trip {