---
title: SeverancePayFundingPlan
slug: oip-next/ekv6ve83hpttcvvumfoid
icon: {"lucideIcon":"📘"}
createdAt: 2024-04-08T10:17:29.000Z
---

# SeverancePayFundingPlan

## Description

L'entité SeverancePayFundingPlan contient les données issues des résultats du simulateur pour le calcul de l'IFC théorique.

## Relations

### Ascendantes

| Entité                 | Propriété                |
| ---------------------- | ------------------------ |
| SeverancePayHypothesis | severancePayFundingPlans |

### Descendantes

| Entité  | Propriété |
| ------- | --------- |
| History | history   |

## Propriétés

| Nom                       | Type     | Description                                                                                       | Validateur | Lecture seule ? | Dépréciée ? | Dernière version modifiée |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------- | ---------- | --------------- | ----------- | ------------------------- |
| allocationYear            | `String` | Il s'agit de l'année de répartition du plan de financement.                                       |            |                 |             | 2.7.0                     |
| amount                    | `Number` | Il s'agit du montant du plan de financement.                                                      |            |                 |             | 2.7.0                     |
| employeeCount             | `Number` | Il s'agit de l'effectif des salariés.                                                             |            |                 |             | 2.7.0                     |
| id                        | `String` | Identifiant de l'entité `SeverancePayFundingPlan`                                                 |            | X               |             |                           |
| code                      | `String` | Codification fonctionnelle de l'entité `SeverancePayFundingPlan`                                  |            |                 |             |                           |
| externalId                | `String` | Identifiant de l'entité `SeverancePayFundingPlan` dans le système client                          |            |                 |             |                           |
| externalCode              | `String` | Codification fonctionnelle de l'entité `SeverancePayFundingPlan` dans le système client           |            |                 |             |                           |
| severancePayFundingPlanId | `String` | Identifiant public de l'entité `SeverancePayFundingPlan` dans l'OIP                               |            |                 |             |                           |
| label                     | `String` | Information relative au nom de l'entité `SeverancePayFundingPlan` dans son contexte d'utilisation |            |                 |             |                           |
| createdAt                 | `Date`   | Date de création de l'entité `SeverancePayFundingPlan`                                            |            | X               |             |                           |
| updatedAt                 | `Date`   | Date de modification de l'entité `SeverancePayFundingPlan`                                        |            | X               |             |                           |

## Enumérations

Aucune enumération.

## Enumérations génériques

Aucune enumération générique.

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getHypothesisId } from '@fasstech/oip-core/entities/Hypothesis';
import { getOfferId } from '@fasstech/oip-core/entities/Offer';
import { getProjectId } from '@fasstech/oip-core/entities/Project';
import { getSeverancePayFundingPlanAllocationYear, getSeverancePayFundingPlanAmount, getSeverancePayFundingPlanCode, getSeverancePayFundingPlanEmployeeCount, getSeverancePayFundingPlanExternalCode, getSeverancePayFundingPlanExternalId, getSeverancePayFundingPlanId, getSeverancePayFundingPlanLabel, getSeverancePayFundingPlanSeverancePayFundingPlanId, setSeverancePayFundingPlanAllocationYear, setSeverancePayFundingPlanAmount, setSeverancePayFundingPlanCode, setSeverancePayFundingPlanEmployeeCount, setSeverancePayFundingPlanExternalCode, setSeverancePayFundingPlanExternalId, setSeverancePayFundingPlanLabel, setSeverancePayFundingPlanSeverancePayFundingPlanId } from '@fasstech/oip-core/entities/SeverancePayFundingPlan';
import { getSeverancePayHypothesisId } from '@fasstech/oip-core/entities/SeverancePayHypothesis';

(async () => {
  let project = await Entities('Project').create();
  let offer = await Entities('Offer').create();
  let hypothesis = await Entities('Hypothesis').create();
  let severancePayHypothesis = await Entities('SeverancePayHypothesis').create();
  const severancePayFundingPlan = await Entities('SeverancePayFundingPlan').create();
  
  setSeverancePayFundingPlanAllocationYear('allocationYear', severancePayFundingPlan);
  setSeverancePayFundingPlanAmount(97, severancePayFundingPlan);
  setSeverancePayFundingPlanEmployeeCount(101, severancePayFundingPlan);
  setSeverancePayFundingPlanCode('code', severancePayFundingPlan);
  setSeverancePayFundingPlanExternalId('externalId', severancePayFundingPlan);
  setSeverancePayFundingPlanExternalCode('externalCode', severancePayFundingPlan);
  setSeverancePayFundingPlanSeverancePayFundingPlanId('severancePayFundingPlanId', severancePayFundingPlan);
  setSeverancePayFundingPlanLabel('label', severancePayFundingPlan);
  
  severancePayHypothesis = await Entities('SeverancePayFundingPlan').save(severancePayHypothesis, severancePayFundingPlan);
  hypothesis = await Entities('SeverancePayHypothesis').save(hypothesis, severancePayHypothesis);
  offer = await Entities('Hypothesis').save(offer, hypothesis);
  project = await Entities('Offer').save(project, offer);
  await Entities('Project').save(project);
  
  const projectToTest = await Entities('Project').get({ id: getProjectId(project) });
  const offerToTest = await Entities('Offer').get(projectToTest, { filter: ({ id }) => id === getOfferId(offer) });
  const hypothesisToTest = await Entities('Hypothesis').get(offerToTest, { filter: ({ id }) => id === getHypothesisId(hypothesis) });
  const severancePayHypothesisToTest = await Entities('SeverancePayHypothesis').get(hypothesisToTest, { filter: ({ id }) => id === getSeverancePayHypothesisId(severancePayHypothesis) });
  const severancePayFundingPlanToTest = await Entities('SeverancePayFundingPlan').get(severancePayHypothesisToTest, { filter: ({ id }) => id === getSeverancePayFundingPlanId(severancePayFundingPlan) });
  
  getSeverancePayFundingPlanAllocationYear(severancePayFundingPlanToTest); // 'allocationYear'
  getSeverancePayFundingPlanAmount(severancePayFundingPlanToTest); // 97
  getSeverancePayFundingPlanEmployeeCount(severancePayFundingPlanToTest); // 101
  getSeverancePayFundingPlanCode(severancePayFundingPlanToTest); // 'code'
  getSeverancePayFundingPlanExternalId(severancePayFundingPlanToTest); // 'externalId'
  getSeverancePayFundingPlanExternalCode(severancePayFundingPlanToTest); // 'externalCode'
  getSeverancePayFundingPlanSeverancePayFundingPlanId(severancePayFundingPlanToTest); // 'severancePayFundingPlanId'
  getSeverancePayFundingPlanLabel(severancePayFundingPlanToTest); // 'label'
})();
```
