15 lines
1.1 KiB
TypeScript
15 lines
1.1 KiB
TypeScript
import { integer, jsonb, pgSchema, text, varchar } from "drizzle-orm/pg-core";
|
|
import type { CatalogBaseStat } from "@/lib/translator/types";
|
|
|
|
export const catalogSchema = pgSchema("catalog");
|
|
|
|
export const catalogCharacters = catalogSchema.table("character", {
|
|
key: varchar("key", { length: 64 }).primaryKey(), name: text("name").notNull(), element: varchar("element", { length: 48 }), rarity: integer("rarity"), weaponType: varchar("weapon_type", { length: 64 }), imageKey: text("image_key").notNull(), baseStats: jsonb("base_stats").$type<CatalogBaseStat[]>().default([]).notNull(),
|
|
});
|
|
export const catalogWeapons = catalogSchema.table("weapon", {
|
|
key: varchar("key", { length: 64 }).primaryKey(), name: text("name").notNull(), rarity: integer("rarity"), weaponType: varchar("weapon_type", { length: 64 }), imageKey: text("image_key").notNull(),
|
|
});
|
|
export const catalogArtifacts = catalogSchema.table("artifact", {
|
|
key: varchar("key", { length: 64 }).primaryKey(), name: text("name").notNull(), rarity: integer("rarity"), imageKey: text("image_key").notNull(),
|
|
});
|