import { pgTable, bigint, date, text, timestamp } from "drizzle-orm/pg-core"

export const holidays = pgTable("holidays", {
    id: bigint("id", { mode: "number" })
        .primaryKey()
        .generatedAlwaysAsIdentity(),

    date: date("date").notNull(),

    name: text("name").notNull(),

    state_code: text("state_code").notNull(),

    createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
})

export type Holiday = typeof holidays.$inferSelect
export type NewHoliday = typeof holidays.$inferInsert
