add embeddings, remove userId from business & commercialProperty replaced by email
This commit is contained in:
@@ -9,7 +9,7 @@ export const users = pgTable('users', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
firstname: varchar('firstname', { length: 255 }).notNull(),
|
||||
lastname: varchar('lastname', { length: 255 }).notNull(),
|
||||
email: varchar('email', { length: 255 }).notNull(),
|
||||
email: varchar('email', { length: 255 }).notNull().unique(),
|
||||
phoneNumber: varchar('phoneNumber', { length: 255 }),
|
||||
description: text('description'),
|
||||
companyName: varchar('companyName', { length: 255 }),
|
||||
@@ -26,11 +26,12 @@ export const users = pgTable('users', {
|
||||
customerSubType: customerSubTypeEnum('customerSubType'),
|
||||
created: timestamp('created'),
|
||||
updated: timestamp('updated'),
|
||||
embedding: vector('embedding', { dimensions: 1536 }),
|
||||
});
|
||||
|
||||
export const businesses = pgTable('businesses', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
userId: uuid('userId').references(() => users.id),
|
||||
email: varchar('email', { length: 255 }).references(() => users.email),
|
||||
type: integer('type'),
|
||||
title: varchar('title', { length: 255 }),
|
||||
description: text('description'),
|
||||
@@ -59,13 +60,12 @@ export const businesses = pgTable('businesses', {
|
||||
lastVisit: timestamp('lastVisit'),
|
||||
// Neue Spalte für das OpenAI Embedding
|
||||
embedding: vector('embedding', { dimensions: 1536 }),
|
||||
// embedding: sql`vector(1536)`,
|
||||
});
|
||||
|
||||
export const commercials = pgTable('commercials', {
|
||||
id: uuid('id').primaryKey().defaultRandom(),
|
||||
serialId: serial('serial_id'),
|
||||
userId: uuid('userId').references(() => users.id),
|
||||
email: varchar('email', { length: 255 }).references(() => users.email),
|
||||
type: integer('type'),
|
||||
title: varchar('title', { length: 255 }),
|
||||
description: text('description'),
|
||||
@@ -78,13 +78,11 @@ export const commercials = pgTable('commercials', {
|
||||
draft: boolean('draft'),
|
||||
zipCode: integer('zipCode'),
|
||||
county: varchar('county', { length: 255 }),
|
||||
email: varchar('email', { length: 255 }),
|
||||
website: varchar('website', { length: 255 }),
|
||||
phoneNumber: varchar('phoneNumber', { length: 255 }),
|
||||
imageOrder: varchar('imageOrder', { length: 200 }).array(),
|
||||
imagePath: varchar('imagePath', { length: 200 }),
|
||||
created: timestamp('created'),
|
||||
updated: timestamp('updated'),
|
||||
visits: integer('visits'),
|
||||
lastVisit: timestamp('lastVisit'),
|
||||
embedding: vector('embedding', { dimensions: 1536 }),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user