mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-22 22:16:29 +01:00
refactoring types / get types directly from drizzle
This commit is contained in:
parent
6ed53835ff
commit
0a3636fda8
6 changed files with 30 additions and 0 deletions
5
api/src/types/attraction.ts
Normal file
5
api/src/types/attraction.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm';
|
||||||
|
import { attraction } from '../db/schema';
|
||||||
|
|
||||||
|
export type Attraction = InferInsertModel<typeof attraction>
|
||||||
|
export type AttractionSelect = InferSelectModel<typeof attraction>
|
||||||
5
api/src/types/attractionNotification.ts
Normal file
5
api/src/types/attractionNotification.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm';
|
||||||
|
import { attractionNotification } from '../db/schema';
|
||||||
|
|
||||||
|
export type AttractionNotification = InferInsertModel<typeof attractionNotification>
|
||||||
|
export type AttractionNotificationSelect = InferSelectModel<typeof attractionNotification>
|
||||||
5
api/src/types/logbook.ts
Normal file
5
api/src/types/logbook.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm';
|
||||||
|
import { logbook } from '../db/schema';
|
||||||
|
|
||||||
|
export type Logbook = InferInsertModel<typeof logbook>
|
||||||
|
export type LogbookSelect = InferSelectModel<typeof logbook>
|
||||||
5
api/src/types/notificationMethod.ts
Normal file
5
api/src/types/notificationMethod.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm';
|
||||||
|
import { notificationMethod } from '../db/schema';
|
||||||
|
|
||||||
|
export type NotificationMethod = InferInsertModel<typeof notificationMethod>
|
||||||
|
export type NotificationMethodSelect = InferSelectModel<typeof notificationMethod>
|
||||||
5
api/src/types/themepark.ts
Normal file
5
api/src/types/themepark.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm';
|
||||||
|
import { themepark } from '../db/schema';
|
||||||
|
|
||||||
|
export type Themepark = InferInsertModel<typeof themepark>
|
||||||
|
export type ThemeparkSelect = InferSelectModel<typeof themepark>
|
||||||
5
api/src/types/user.ts
Normal file
5
api/src/types/user.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { type InferSelectModel, type InferInsertModel } from 'drizzle-orm';
|
||||||
|
import { user } from '../db/schema';
|
||||||
|
|
||||||
|
export type User = InferInsertModel<typeof user>
|
||||||
|
export type UserSelect = InferSelectModel<typeof user>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue