From 0a3636fda83473f5fb7b360dcaeb61baa72750f1 Mon Sep 17 00:00:00 2001 From: michivonah Date: Sat, 27 Sep 2025 15:32:18 +0200 Subject: [PATCH] refactoring types / get types directly from drizzle --- api/src/types/attraction.ts | 5 +++++ api/src/types/attractionNotification.ts | 5 +++++ api/src/types/logbook.ts | 5 +++++ api/src/types/notificationMethod.ts | 5 +++++ api/src/types/themepark.ts | 5 +++++ api/src/types/user.ts | 5 +++++ 6 files changed, 30 insertions(+) create mode 100644 api/src/types/attraction.ts create mode 100644 api/src/types/attractionNotification.ts create mode 100644 api/src/types/logbook.ts create mode 100644 api/src/types/notificationMethod.ts create mode 100644 api/src/types/themepark.ts create mode 100644 api/src/types/user.ts diff --git a/api/src/types/attraction.ts b/api/src/types/attraction.ts new file mode 100644 index 0000000..11c4438 --- /dev/null +++ b/api/src/types/attraction.ts @@ -0,0 +1,5 @@ +import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { attraction } from '../db/schema'; + +export type Attraction = InferInsertModel +export type AttractionSelect = InferSelectModel \ No newline at end of file diff --git a/api/src/types/attractionNotification.ts b/api/src/types/attractionNotification.ts new file mode 100644 index 0000000..753eaf2 --- /dev/null +++ b/api/src/types/attractionNotification.ts @@ -0,0 +1,5 @@ +import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { attractionNotification } from '../db/schema'; + +export type AttractionNotification = InferInsertModel +export type AttractionNotificationSelect = InferSelectModel \ No newline at end of file diff --git a/api/src/types/logbook.ts b/api/src/types/logbook.ts new file mode 100644 index 0000000..2d8129a --- /dev/null +++ b/api/src/types/logbook.ts @@ -0,0 +1,5 @@ +import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { logbook } from '../db/schema'; + +export type Logbook = InferInsertModel +export type LogbookSelect = InferSelectModel \ No newline at end of file diff --git a/api/src/types/notificationMethod.ts b/api/src/types/notificationMethod.ts new file mode 100644 index 0000000..6d45a9a --- /dev/null +++ b/api/src/types/notificationMethod.ts @@ -0,0 +1,5 @@ +import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { notificationMethod } from '../db/schema'; + +export type NotificationMethod = InferInsertModel +export type NotificationMethodSelect = InferSelectModel \ No newline at end of file diff --git a/api/src/types/themepark.ts b/api/src/types/themepark.ts new file mode 100644 index 0000000..b0d23b8 --- /dev/null +++ b/api/src/types/themepark.ts @@ -0,0 +1,5 @@ +import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { themepark } from '../db/schema'; + +export type Themepark = InferInsertModel +export type ThemeparkSelect = InferSelectModel \ No newline at end of file diff --git a/api/src/types/user.ts b/api/src/types/user.ts new file mode 100644 index 0000000..c4f4353 --- /dev/null +++ b/api/src/types/user.ts @@ -0,0 +1,5 @@ +import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm'; +import { user } from '../db/schema'; + +export type User = InferInsertModel +export type UserSelect = InferSelectModel \ No newline at end of file