feat(guides) : add selectable target and team conditions
CI / Build immutable images and deploy (push) Has been cancelled
CI / Verify (push) Has been cancelled

This commit is contained in:
2026-09-06 17:40:06 +07:00 Unverified
parent 6dc46ca2a7
commit fcf6a2c187
13 changed files with 4207 additions and 63 deletions
+16
View File
@@ -660,11 +660,26 @@ export const artifactProfiles = guidesSchema.table("artifact_profile", {
circlet: jsonb("circlet").$type<string[]>().default([]).notNull(),
substats: jsonb("substats").$type<string[]>().default([]).notNull(),
targets: jsonb("targets").$type<Array<{ stat: string; value: string }>>().default([]).notNull(),
targetConditions: jsonb("target_conditions")
.$type<Array<{ note: string | null; rows: Array<{ stat: string; value: string }> }>>()
.default([])
.notNull(),
talents: jsonb("talents").$type<Array<{ type: "NA" | "E" | "Q"; priority: number; level?: string; relationToNext?: "gt" | "gte" | "eq" }>>().default([]).notNull(),
note: text("note"),
...timestamps,
});
export const teamConditions = guidesSchema.table(
"team_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("team_condition_order_idx").on(table.guideId, table.sortOrder)],
);
export const constellationConditions = guidesSchema.table(
"constellation_condition",
{
@@ -693,6 +708,7 @@ export const teamCompositions = guidesSchema.table(
{
id: uuid("id").defaultRandom().primaryKey(),
guideId: uuid("guide_id").notNull().references(() => guides.id, { onDelete: "cascade" }),
conditionId: uuid("condition_id").references(() => teamConditions.id, { onDelete: "cascade" }),
title: text("title").notNull(),
rotationSeconds: numeric("rotation_seconds", { precision: 8, scale: 2 }).notNull(),
combo: text("combo").notNull(),