---
title: SeverancePay
slug: oip-next/hv60qp5yyuzcnj5mabfbh
createdAt: 2024-03-08T13:35:01.000Z
---

# SeverancePay

## Description

L’entité SeverancePay contient les différentes informations liées au parcours client IFC qui ne sont pas des hypotthèses.

## Relations

### Ascendantes

| Entité  | Propriété     |
| ------- | ------------- |
| Pension | severancePays |

### Descendantes

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

## Liste des propriétés

| Nom                       | Type                                        | Dernière version modifiée | Description                                                           | Getter                                   | Setter                                   | Deprecated |
| ------------------------- | ------------------------------------------- | ------------------------- | --------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------- |
| createdAt                 | `Date`                                      |                           | Date de création de l'entité `SeverancePay`                           | getSeverancePayCreatedAt                 | Lecture seule                            | -          |
| createdBy                 | `String`                                    |                           | Utilisateur à l'origine de la création de l'entité `SeverancePay`     | getSeverancePayCreatedBy                 | Lecture seule                            | -          |
| financialManagementMethod | `SeverancePayfinancialManagementMethodEnum` | 2.8.0                     | Il s’agit du mode de financement choisi pour la gestion du contrat    | getSeverancePayFinancialManagementMethod | setSeverancePayFinancialManagementMethod | -          |
| guidedManagementOption    | `SeverancePayguidedManagementOptionEnum`    | 2.8.0                     | Profil de risque                                                      | getSeverancePayGuidedManagementOption    | setSeverancePayGuidedManagementOption    | -          |
| id                        | `String`                                    |                           | Identifiant unique de l'entité `SeverancePay`                         | getSeverancePayId                        | Lecture seule                            | -          |
| updatedAt                 | `Date`                                      |                           | Date de modification de l'entité `SeverancePay`                       | getSeverancePayUpdatedAt                 | Lecture seule                            | -          |
| updatedBy                 | `String`                                    |                           | Utilisateur à l'origine de la modification de l'entité `SeverancePay` | getSeverancePayUpdatedBy                 | Lecture seule                            | -          |

## Enums

### SeverancePayfinancialManagementMethodEnum

- `SeverancePayfinancialManagementMethodEnum.FREE`
- `SeverancePayfinancialManagementMethodEnum.GUIDED`

### SeverancePayguidedManagementOptionEnum

- `SeverancePayguidedManagementOptionEnum.CAREFUL`
- `SeverancePayguidedManagementOptionEnum.BALANCE`
- `SeverancePayguidedManagementOptionEnum.DYNAMIC`

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getOfferId } from '@fasstech/oip-core/entities/offer';
import { getProjectId } from '@fasstech/oip-core/entities/project';
import { getSeverancePayFinancialManagementMethod, getSeverancePayGuidedManagementOption, getseverancePayId, setSeverancePayFinancialManagementMethod, setSeverancePayGuidedManagementOption } from '@fasstech/oip-core/entities/severancePay';
import { SeverancePayfinancialManagementMethodEnum, SeverancePayguidedManagementOptionEnum } from '@fasstech/oip-core/entities/severancePay/enums';

(async () => {
  let ProjectEntity = await Entities('Project').get({ id: projectId });
  let OfferEntity = await Entities('Offer').create();
  let PensionEntity = await Entities('Pension').get(OfferEntity);
  const SeverancePayEntity = await Entities('SeverancePay').create();
  
  setSeverancePayFinancialManagementMethod(SeverancePayfinancialManagementMethodEnum.FREE, SeverancePayEntity);
  setSeverancePayGuidedManagementOption(SeverancePayguidedManagementOptionEnum.CAREFUL, SeverancePayEntity);
  
  PensionEntity = await Entities('SeverancePay').save(PensionEntity, SeverancePayEntity);
  OfferEntity = await Entities('Pension').save(OfferEntity, PensionEntity);
  ProjectEntity = await Entities('Offer').save(ProjectEntity, OfferEntity);
  await Entities('Project').save(ProjectEntity);
  
  const ProjectEntityToTest = await Entities('Project').get({ id: getProjectId(ProjectEntity) });
  const OfferEntityToTest = await Entities('Offer').get(ProjectEntityToTest, getOfferId(OfferEntity));
  const PensionEntityToTest = await Entities('Pension').get(OfferEntityToTest);
  const SeverancePayEntityToTest = await Entities('SeverancePay').get(PensionEntityToTest, getSeverancePayId(SeverancePayEntity));
  
  getSeverancePayFinancialManagementMethod(SeverancePayEntityToTest); // SeverancePayfinancialManagementMethodEnum.FREE
  getSeverancePayGuidedManagementOption(SeverancePayEntityToTest); // SeverancePayguidedManagementOptionEnum.CAREFUL
})();
```
