Skip to content

Commit

Permalink
Merge pull request #144 from UN-OCHA/HPC-9142
Browse files Browse the repository at this point in the history
HPC-9142: Add `parentGoverningEntityId` field to `planEntity` model
  • Loading branch information
Pl217 authored Apr 23, 2024
2 parents d8afc7f + c85728e commit 9ce00ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unocha/hpc-api-core",
"version": "7.5.0",
"version": "7.6.0",
"description": "Core libraries supporting HPC.Tools API Backend",
"license": "Apache-2.0",
"private": false,
Expand Down
7 changes: 7 additions & 0 deletions src/db/models/planEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { brandedType } from '../../util/io-ts';
import type { Brand } from '../../util/types';
import { defineLegacyVersionedModel } from '../util/legacy-versioned-model';
import { ENTITY_PROTOTYPE_ID } from './entityPrototype';
import { GOVERNING_ENTITY_ID } from './governingEntity';
import { PLAN_ID } from './plan';

export type PlanEntityId = Brand<
Expand All @@ -27,6 +28,12 @@ export default defineLegacyVersionedModel({
brand: ENTITY_PROTOTYPE_ID,
},
},
optional: {
parentGoverningEntityId: {
kind: 'branded-integer',
brand: GOVERNING_ENTITY_ID,
},
},
},
idField: 'id',
softDeletionEnabled: true,
Expand Down

0 comments on commit 9ce00ca

Please sign in to comment.