Add new migrations and update Adventure interface

This commit is contained in:
Sean Morley
2024-04-22 00:56:43 +00:00
parent a3d4d757a9
commit 921d36aa70
13 changed files with 2326 additions and 54 deletions

View File

@@ -103,3 +103,19 @@ export const userPlannedAdventures = pgTable("userPlannedAdventures", {
description: text("description"),
date: text("plannedDate"),
});
export const adventureTable = pgTable("adventures", {
id: serial("id").primaryKey(),
type: text("type").notNull(),
userId: text("userId")
.notNull()
.references(() => userTable.id),
name: text("name").notNull(),
location: text("location"),
activityTypes: json("activityTypes"),
description: text("description"),
rating: integer("rating"),
link: text("link"),
imageUrl: text("imageUrl"),
date: text("date"),
});

View File

@@ -1,41 +1,12 @@
export interface Adventure {
id?: number;
name?: string;
location?: string | undefined;
date?: string | undefined;
description?: string | undefined;
activityTypes?: string[] | undefined;
}
export interface RegionInfo {
id: number;
type: string;
name: string;
abbreviation: string;
description: string;
capital: string;
largest_city: string;
area: {
total: number;
units: string;
};
population: {
estimate: number;
year: number;
};
state_flower: string;
state_bird: string;
state_tree: string;
climate: {
description: string;
summer_highs: string;
winter_lows: string;
precipitation: string;
};
economy: {
industries: string[];
agricultural_products: string[];
};
tourism: {
attractions: string[];
};
major_sports_teams: string[];
location?: string | undefined;
activityTypes?: string[] | undefined;
description?: string | undefined;
rating?: number | undefined;
link?: string | undefined;
imageUrl?: string | undefined;
date?: string | undefined;
}

View File

@@ -39,7 +39,7 @@
id="password"
class="block mb-2 input input-bordered w-full max-w-xs"
/><br />
<button class="py-2 px-4 btn btn-primary">Signup</button>
<button class="py-2 px-4 btn btn-primary">Signup and Setup Server</button>
</form>
</div>