Refactor mail schema: simplify products and source fields by removing enum definitions
This commit is contained in:
+2
-20
@@ -7,27 +7,9 @@ export const mailTable = pgTable("mail", {
|
|||||||
email: text("email").notNull(),
|
email: text("email").notNull(),
|
||||||
phone: text("phone"),
|
phone: text("phone"),
|
||||||
request: text("request"),
|
request: text("request"),
|
||||||
products: text("products", {
|
products: text("products").array(),
|
||||||
enum: [
|
|
||||||
"Интерактивная презентация",
|
|
||||||
"Удаленная демонстрация",
|
|
||||||
"Архитектурная визуализация",
|
|
||||||
"Создание сайтов",
|
|
||||||
"Web-тур по 360 сферам",
|
|
||||||
],
|
|
||||||
}).array(),
|
|
||||||
from: text("from").notNull(),
|
from: text("from").notNull(),
|
||||||
referer: text("referer"),
|
referer: text("referer"),
|
||||||
createdAt: timestamp("created_at").defaultNow(),
|
createdAt: timestamp("created_at").defaultNow(),
|
||||||
source: text("source", {
|
source: text("source").array().default([]),
|
||||||
enum: [
|
|
||||||
"Увидели на выставке или форуме",
|
|
||||||
"Видели у других застройщиков",
|
|
||||||
"Из рейтингов и статей",
|
|
||||||
"Нашли в интернете",
|
|
||||||
"Перешли по рекламе",
|
|
||||||
"Из рассылки",
|
|
||||||
"Другое",
|
|
||||||
],
|
|
||||||
}).array().default([]),
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user