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

# SeverancePayTheorical

## Description

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

## Relations

### Ascendantes

| Entité                 | Propriété              |
| ---------------------- | ---------------------- |
| SeverancePayHypothesis | severancePayTheoricals |

### 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.                                                            |            |                 |             | 2.7.0                     |
| amount                  | `Number` | Il s'agit du montant de l'IFC théorique.                                                        |            |                 |             | 2.7.0                     |
| employeeCount           | `Number` | Il s'agit de l'effectif des salariés.                                                           |            |                 |             | 2.7.0                     |
| id                      | `String` | Identifiant de l'entité `SeverancePayTheorical`                                                 |            | X               |             |                           |
| code                    | `String` | Codification fonctionnelle de l'entité `SeverancePayTheorical`                                  |            |                 |             |                           |
| externalId              | `String` | Identifiant de l'entité `SeverancePayTheorical` dans le système client                          |            |                 |             |                           |
| externalCode            | `String` | Codification fonctionnelle de l'entité `SeverancePayTheorical` dans le système client           |            |                 |             |                           |
| severancePayTheoricalId | `String` | Identifiant public de l'entité `SeverancePayTheorical` dans l'OIP                               |            |                 |             |                           |
| label                   | `String` | Information relative au nom de l'entité `SeverancePayTheorical` dans son contexte d'utilisation |            |                 |             |                           |
| createdAt               | `Date`   | Date de création de l'entité `SeverancePayTheorical`                                            |            | X               |             |                           |
| updatedAt               | `Date`   | Date de modification de l'entité `SeverancePayTheorical`                                        |            | 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 { getSeverancePayHypothesisId } from '@fasstech/oip-core/entities/SeverancePayHypothesis';
import { getSeverancePayTheoricalAllocationYear, getSeverancePayTheoricalAmount, getSeverancePayTheoricalCode, getSeverancePayTheoricalEmployeeCount, getSeverancePayTheoricalExternalCode, getSeverancePayTheoricalExternalId, getSeverancePayTheoricalId, getSeverancePayTheoricalLabel, getSeverancePayTheoricalSeverancePayTheoricalId, setSeverancePayTheoricalAllocationYear, setSeverancePayTheoricalAmount, setSeverancePayTheoricalCode, setSeverancePayTheoricalEmployeeCount, setSeverancePayTheoricalExternalCode, setSeverancePayTheoricalExternalId, setSeverancePayTheoricalLabel, setSeverancePayTheoricalSeverancePayTheoricalId } from '@fasstech/oip-core/entities/SeverancePayTheorical';

(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 severancePayTheorical = await Entities('SeverancePayTheorical').create();
  
  setSeverancePayTheoricalAllocationYear('allocationYear', severancePayTheorical);
  setSeverancePayTheoricalAmount(97, severancePayTheorical);
  setSeverancePayTheoricalEmployeeCount(101, severancePayTheorical);
  setSeverancePayTheoricalCode('code', severancePayTheorical);
  setSeverancePayTheoricalExternalId('externalId', severancePayTheorical);
  setSeverancePayTheoricalExternalCode('externalCode', severancePayTheorical);
  setSeverancePayTheoricalSeverancePayTheoricalId('severancePayTheoricalId', severancePayTheorical);
  setSeverancePayTheoricalLabel('label', severancePayTheorical);
  
  severancePayHypothesis = await Entities('SeverancePayTheorical').save(severancePayHypothesis, severancePayTheorical);
  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 severancePayTheoricalToTest = await Entities('SeverancePayTheorical').get(severancePayHypothesisToTest, { filter: ({ id }) => id === getSeverancePayTheoricalId(severancePayTheorical) });
  
  getSeverancePayTheoricalAllocationYear(severancePayTheoricalToTest); // 'allocationYear'
  getSeverancePayTheoricalAmount(severancePayTheoricalToTest); // 97
  getSeverancePayTheoricalEmployeeCount(severancePayTheoricalToTest); // 101
  getSeverancePayTheoricalCode(severancePayTheoricalToTest); // 'code'
  getSeverancePayTheoricalExternalId(severancePayTheoricalToTest); // 'externalId'
  getSeverancePayTheoricalExternalCode(severancePayTheoricalToTest); // 'externalCode'
  getSeverancePayTheoricalSeverancePayTheoricalId(severancePayTheoricalToTest); // 'severancePayTheoricalId'
  getSeverancePayTheoricalLabel(severancePayTheoricalToTest); // 'label'
})();
```
