preciazo/scraper/db/schema.ts

11 lines
421 B
TypeScript
Raw Normal View History

2023-12-22 18:45:20 +00:00
import { integer, sqliteTable, text, b } from "drizzle-orm/sqlite-core";
2023-12-21 17:00:00 +00:00
export const precios = sqliteTable("precios", {
id: integer("id", { mode: "number" }).primaryKey({ autoIncrement: true }),
ean: text("ean").notNull(),
2023-12-22 18:45:20 +00:00
fetchedAt: integer("fetched_at", { mode: "timestamp" }).notNull(),
precioCentavos: integer("precio_centavos"),
inStock: integer("in_stock", { mode: "boolean" }),
2023-12-21 17:00:00 +00:00
url: text("url"),
});