type Breakdown = {
land: number;
construction: number;
other: number;
};
export const table = mysqlTable("table", {
id: varchar("id", { length: 32 }).primaryKey(),
...
debt: json("debt")
.$type<Breakdown>()
.default({ land: 0, construction: 0, other: 0 })
.notNull(),
type Breakdown = {
land: number;
construction: number;
other: number;
};
export const table = mysqlTable("table", {
id: varchar("id", { length: 32 }).primaryKey(),
...
debt: json("debt")
.$type<Breakdown>()
.default({ land: 0, construction: 0, other: 0 })
.notNull(),