feat : add metrial fetcher
This commit is contained in:
+20
-1
@@ -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",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user