interface Address {
street: string
number: string
complement: string
neighborhood: string
city: string
state: string
zipcode: string
}
export const customerTable = pgTable("customer", {
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => userTable.id),
addresses: jsonb("addresses").$type<Address[]>().notNull(),
})
interface Address {
street: string
number: string
complement: string
neighborhood: string
city: string
state: string
zipcode: string
}
export const customerTable = pgTable("customer", {
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => userTable.id),
addresses: jsonb("addresses").$type<Address[]>().notNull(),
})