feat : add metrial fetcher

This commit is contained in:
2026-09-06 13:59:32 +07:00 Unverified
parent 2808a27406
commit 37d6d6703f
8 changed files with 3827 additions and 8 deletions
+20 -1
View File
@@ -16,7 +16,11 @@ import {
varchar,
} from "drizzle-orm/pg-core";
import type { CatalogConstellation, CatalogTalent } from "@/lib/catalog/lunaris";
import type {
CatalogAscensionGroup,
CatalogConstellation,
CatalogTalent,
} from "@/lib/catalog/lunaris";
import type { ExtraSheet } from "@/lib/guides/extra-sheet";
const authSchema = pgSchema("auth");
@@ -451,6 +455,7 @@ export const catalogCharacters = catalogSchema.table(
nameCardImageKey: text("name_card_image_key"),
constellations: jsonb("constellations").$type<CatalogConstellation[]>().default([]).notNull(),
talents: jsonb("talents").$type<CatalogTalent[]>().default([]).notNull(),
ascension: jsonb("ascension").$type<CatalogAscensionGroup[]>().default([]).notNull(),
},
(table) => [
primaryKey({ columns: [table.key] }),
@@ -458,6 +463,20 @@ export const catalogCharacters = catalogSchema.table(
],
);
export const catalogMaterials = catalogSchema.table(
"material",
{
key: varchar("key", { length: 64 }).primaryKey(),
name: text("name").notNull(),
description: text("description"),
rarity: integer("rarity"),
type: varchar("type", { length: 64 }),
imageKey: text("image_key").notNull(),
...timestamps,
},
(table) => [index("catalog_material_name_idx").on(table.name)],
);
export const catalogWeapons = catalogSchema.table(
"weapon",
{