import { pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";
import { InferModel } from "drizzle-orm";

export const organisation = pgTable("organisation", {
  id: uuid("id").defaultRandom().primaryKey(),
  createdAt: timestamp("created_at", { precision: 6, withTimezone: true })
    .defaultNow()
    .notNull(),
  updatedAt: timestamp("updated_at", { precision: 6, withTimezone: true })
    .defaultNow()
    .notNull(),
  hubspotCompanyId: text("hubspot_company_id"),
  name: text("name"),
});

export type Organisation = InferModel<typeof organisation, "select">;
export type NewOrganisation = InferModel<typeof organisation, "insert">;
