Umbau auf postgres 2. step
This commit is contained in:
@@ -24,7 +24,7 @@ export const users = pgTable('users', {
|
||||
export const businesses = pgTable('businesses', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
userId: uuid('userId').references(()=>users.id),
|
||||
type: varchar('type', { length: 255 }),
|
||||
type: integer('type'),
|
||||
title: varchar('title', { length: 255 }),
|
||||
description: text('description'),
|
||||
city: varchar('city', { length: 255 }),
|
||||
@@ -50,10 +50,11 @@ export const businesses = pgTable('businesses', {
|
||||
visits: integer('visits'),
|
||||
lastVisit: timestamp('lastVisit'),
|
||||
});
|
||||
|
||||
export const commercials = pgTable('commercials', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
userId: uuid('userId').references(()=>users.id),
|
||||
type: varchar('type', { length: 255 }),
|
||||
type: integer('type'),
|
||||
title: varchar('title', { length: 255 }),
|
||||
description: text('description'),
|
||||
city: varchar('city', { length: 255 }),
|
||||
@@ -74,6 +75,4 @@ export const commercials = pgTable('commercials', {
|
||||
visits: integer('visits'),
|
||||
lastVisit: timestamp('lastVisit'),
|
||||
});
|
||||
export type BusinessListing = InferInsertModel<typeof businesses>;
|
||||
export type CommercialPropertyListing = InferInsertModel<typeof commercials>;
|
||||
export type User = InferSelectModel<typeof users>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user