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

# InvestmentBreakdown

## Description

L'entité InvestmentBreakdown permet de gérer la répartition des investissements sur différents fonds de placements sur des produits d'épargne.

## Relations

### Ascendantes

| Entité  | Propriété            |
| ------- | -------------------- |
| Pension | investmentBreakdowns |

### Descendantes

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

## Propriétés

| Nom                              | Type     | Description                                                                                   | Validateur | Lecture seule ? | Dépréciée ? | Dernière version modifiée |
| -------------------------------- | -------- | --------------------------------------------------------------------------------------------- | ---------- | --------------- | ----------- | ------------------------- |
| investedPercent                  | `Number` | Pourcentage alloué dans les titres financiers                                                 |            |                 |             | 2.4.0                     |
| isin                             | `String` | Code d'identification d'un titre financier                                                    |            |                 |             | 2.4.0                     |
| maximazingInvestmentGainsPercent | `Number` | Pourcentage alloué à la maximisation des plus-values                                          |            |                 |             | 2.4.0                     |
| partId                           | `String` | Identifiant de type de part d'un fond d'investissement UC                                     |            |                 |             | 2.4.0                     |
| securingInvestmentGainsPercent   | `Number` | Pourcentage alloué à la sécurisation des plus-values                                          |            |                 |             | 2.4.0                     |
| url                              | `String` | Url du document d'information du titre financier                                              |            |                 |             | 2.4.0                     |
| id                               | `String` | Identifiant de l'entité `InvestmentBreakdown`                                                 |            | X               |             |                           |
| code                             | `String` | Codification fonctionnelle de l'entité `InvestmentBreakdown`                                  |            |                 |             |                           |
| externalId                       | `String` | Identifiant de l'entité `InvestmentBreakdown` dans le système client                          |            |                 |             |                           |
| externalCode                     | `String` | Codification fonctionnelle de l'entité `InvestmentBreakdown` dans le système client           |            |                 |             |                           |
| investmentBreakdownId            | `String` | Identifiant public de l'entité `InvestmentBreakdown` dans l'OIP                               |            |                 |             |                           |
| label                            | `String` | Information relative au nom de l'entité `InvestmentBreakdown` dans son contexte d'utilisation |            |                 |             |                           |
| createdAt                        | `Date`   | Date de création de l'entité `InvestmentBreakdown`                                            |            | X               |             |                           |
| updatedAt                        | `Date`   | Date de modification de l'entité `InvestmentBreakdown`                                        |            | 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 { getInvestmentBreakdownCode, getInvestmentBreakdownExternalCode, getInvestmentBreakdownExternalId, getInvestmentBreakdownId, getInvestmentBreakdownInvestedPercent, getInvestmentBreakdownInvestmentBreakdownId, getInvestmentBreakdownIsin, getInvestmentBreakdownLabel, getInvestmentBreakdownMaximazingInvestmentGainsPercent, getInvestmentBreakdownPartId, getInvestmentBreakdownSecuringInvestmentGainsPercent, getInvestmentBreakdownUrl, setInvestmentBreakdownCode, setInvestmentBreakdownExternalCode, setInvestmentBreakdownExternalId, setInvestmentBreakdownInvestedPercent, setInvestmentBreakdownInvestmentBreakdownId, setInvestmentBreakdownIsin, setInvestmentBreakdownLabel, setInvestmentBreakdownMaximazingInvestmentGainsPercent, setInvestmentBreakdownPartId, setInvestmentBreakdownSecuringInvestmentGainsPercent, setInvestmentBreakdownUrl } from '@fasstech/oip-core/entities/InvestmentBreakdown';
import { getOfferId } from '@fasstech/oip-core/entities/Offer';
import { getPensionId } from '@fasstech/oip-core/entities/Pension';
import { getProjectId } from '@fasstech/oip-core/entities/Project';

(async () => {
  let project = await Entities('Project').create();
  let offer = await Entities('Offer').create();
  let pension = await Entities('Pension').create();
  const investmentBreakdown = await Entities('InvestmentBreakdown').create();
  
  setInvestmentBreakdownInvestedPercent(105, investmentBreakdown);
  setInvestmentBreakdownIsin('isin', investmentBreakdown);
  setInvestmentBreakdownMaximazingInvestmentGainsPercent(109, investmentBreakdown);
  setInvestmentBreakdownPartId('partId', investmentBreakdown);
  setInvestmentBreakdownSecuringInvestmentGainsPercent(115, investmentBreakdown);
  setInvestmentBreakdownUrl('url', investmentBreakdown);
  setInvestmentBreakdownCode('code', investmentBreakdown);
  setInvestmentBreakdownExternalId('externalId', investmentBreakdown);
  setInvestmentBreakdownExternalCode('externalCode', investmentBreakdown);
  setInvestmentBreakdownInvestmentBreakdownId('investmentBreakdownId', investmentBreakdown);
  setInvestmentBreakdownLabel('label', investmentBreakdown);
  
  pension = await Entities('InvestmentBreakdown').save(pension, investmentBreakdown);
  offer = await Entities('Pension').save(offer, pension);
  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 pensionToTest = await Entities('Pension').get(offerToTest, { filter: ({ id }) => id === getPensionId(pension) });
  const investmentBreakdownToTest = await Entities('InvestmentBreakdown').get(pensionToTest, { filter: ({ id }) => id === getInvestmentBreakdownId(investmentBreakdown) });
  
  getInvestmentBreakdownInvestedPercent(investmentBreakdownToTest); // 105
  getInvestmentBreakdownIsin(investmentBreakdownToTest); // 'isin'
  getInvestmentBreakdownMaximazingInvestmentGainsPercent(investmentBreakdownToTest); // 109
  getInvestmentBreakdownPartId(investmentBreakdownToTest); // 'partId'
  getInvestmentBreakdownSecuringInvestmentGainsPercent(investmentBreakdownToTest); // 115
  getInvestmentBreakdownUrl(investmentBreakdownToTest); // 'url'
  getInvestmentBreakdownCode(investmentBreakdownToTest); // 'code'
  getInvestmentBreakdownExternalId(investmentBreakdownToTest); // 'externalId'
  getInvestmentBreakdownExternalCode(investmentBreakdownToTest); // 'externalCode'
  getInvestmentBreakdownInvestmentBreakdownId(investmentBreakdownToTest); // 'investmentBreakdownId'
  getInvestmentBreakdownLabel(investmentBreakdownToTest); // 'label'
})();
```
