import { pgTable, uuid, text, timestamp, jsonb } from "drizzle-orm/pg-core"; export const farms = pgTable("farms", { id: uuid("id").primaryKey().defaultRandom(), name: text("name").notNull(), ownerId: uuid("owner_id").notNull(), edgeProxyToken: text("edge_proxy_token").notNull(), location: text("location"), settings: jsonb("settings").$type>().default({}), createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(), updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow().notNull(), }); export type Farm = typeof farms.$inferSelect; export type NewFarm = typeof farms.$inferInsert;