diff --git a/package.json b/package.json index 0178df07..b8a9da31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@unocha/hpc-api-core", - "version": "7.3.0", + "version": "7.4.0", "description": "Core libraries supporting HPC.Tools API Backend", "license": "Apache-2.0", "private": false, diff --git a/src/db/models/planVersion.ts b/src/db/models/planVersion.ts index a79e60f6..dbd6f056 100644 --- a/src/db/models/planVersion.ts +++ b/src/db/models/planVersion.ts @@ -20,6 +20,11 @@ const PLAN_VERSION_CLUSTER_SELECTION_TYPE = t.keyof({ multi: null, }); +const PLAN_VISIBILITY_PREFERENCES = t.type({ + isDisaggregationForCaseloads: t.boolean, + isDisaggregationForIndicators: t.boolean, +}); + export default defineLegacyVersionedModel({ tableName: 'planVersion', fields: { @@ -28,6 +33,10 @@ export default defineLegacyVersionedModel({ }, nonNullWithDefault: { isForHPCProjects: { kind: 'checked', type: t.boolean }, + visibilityPreferences: { + kind: 'checked', + type: PLAN_VISIBILITY_PREFERENCES, + }, }, required: { planId: { kind: 'branded-integer', brand: PLAN_ID },