feat(weapons) : add conditions and unsaved changes warning
CI / Verify (push) Failing after 42s
CI / Build immutable images and deploy (push) Has been skipped

This commit is contained in:
2026-09-04 00:33:03 +07:00 Unverified
parent a4cc93c7f6
commit c9e0fe02e3
14 changed files with 201 additions and 56 deletions
+13 -2
View File
@@ -523,11 +523,22 @@ export const guideSections = guidesSchema.table(
],
);
export const weaponConditions = guidesSchema.table(
"weapon_condition",
{
id: uuid("id").defaultRandom().primaryKey(),
guideId: uuid("guide_id").notNull().references(() => guides.id, { onDelete: "cascade" }),
note: text("note"),
sortOrder: integer("sort_order").default(0).notNull(),
},
(table) => [index("weapon_condition_order_idx").on(table.guideId, table.sortOrder)],
);
export const weaponRecommendations = guidesSchema.table(
"weapon_recommendation",
{
id: uuid("id").defaultRandom().primaryKey(),
guideId: uuid("guide_id").notNull().references(() => guides.id, { onDelete: "cascade" }),
conditionId: uuid("condition_id").notNull().references(() => weaponConditions.id, { onDelete: "cascade" }),
weaponKey: varchar("weapon_key", { length: 64 }).notNull(),
refinement: integer("refinement").notNull(),
overallPercent: numeric("overall_percent", { precision: 8, scale: 2 }),
@@ -535,7 +546,7 @@ export const weaponRecommendations = guidesSchema.table(
note: text("note"),
sortOrder: integer("sort_order").default(0).notNull(),
},
(table) => [index("weapon_recommendation_order_idx").on(table.guideId, table.sortOrder)],
(table) => [index("weapon_recommendation_order_idx").on(table.conditionId, table.sortOrder)],
);
export const artifactGroups = guidesSchema.table(