feat(admin) : persist drafts and add constellation conditions
CI / Verify (push) Successful in 59s
CI / Build immutable images and deploy (push) Successful in 1m58s

This commit is contained in:
2026-09-02 12:40:13 +07:00 Unverified
parent 5a2e2e4829
commit 7708a2df31
17 changed files with 3738 additions and 100 deletions
+13 -2
View File
@@ -574,16 +574,27 @@ export const artifactProfiles = guidesSchema.table("artifact_profile", {
...timestamps,
});
export const constellationConditions = guidesSchema.table(
"constellation_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("constellation_condition_order_idx").on(table.guideId, table.sortOrder)],
);
export const constellationRecommendations = guidesSchema.table(
"constellation_recommendation",
{
guideId: uuid("guide_id").notNull().references(() => guides.id, { onDelete: "cascade" }),
conditionId: uuid("condition_id").notNull().references(() => constellationConditions.id, { onDelete: "cascade" }),
level: integer("level").notNull(),
detail: text("detail").notNull(),
cumulativePercent: numeric("cumulative_percent", { precision: 8, scale: 2 }).notNull(),
isGreat: boolean("is_great").default(false).notNull(),
},
(table) => [primaryKey({ columns: [table.guideId, table.level] })],
(table) => [primaryKey({ columns: [table.conditionId, table.level] })],
);
export const teamCompositions = guidesSchema.table(