---
title: StockFunds
slug: oip-next/ffoelvqfbqewytwnufb-l
createdAt: 2024-03-08T13:43:43.000Z
---

# StockFunds

## Description

L’entité stockFunds contient les différentes informations liées à la liste des fonds choisis lors du parcours IFC. Ils peuvent être choisis dans le cas d’une gestion libre ou bien pré sélectionnés lors d’une gestion profilée ou guidée.

## Relations

### Ascendantes

| Entité       | Propriété  |
| ------------ | ---------- |
| SeverancePay | stockFunds |

### Descendantes

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

## 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é `StockFunds`                           | getStockFundsCreatedAt    | Lecture seule             | -          |
| createdBy    | `String` |                           | Utilisateur à l'origine de la création de l'entité `StockFunds`     | getStockFundsCreatedBy    | Lecture seule             | -          |
| distribution | `Number` | 2.9.6                     | Il s’agit de la répartition en %                                    | getStockFundsDistribution | setStockFundsDistribution | -          |
| id           | `String` |                           | Identifiant unique de l'entité `StockFunds`                         | getStockFundsId           | Lecture seule             | -          |
| isin         | `String` | 2.8.0                     | Il s’agit du code d'identification d'un titre financier             | getStockFundsIsin         | setStockFundsIsin         | -          |
| label        | `String` | 2.8.0                     | Il s’agit du libellé du fond                                        | getStockFundsLabel        | setStockFundsLabel        | -          |
| updatedAt    | `Date`   |                           | Date de modification de l'entité `StockFunds`                       | getStockFundsUpdatedAt    | Lecture seule             | -          |
| updatedBy    | `String` |                           | Utilisateur à l'origine de la modification de l'entité `StockFunds` | getStockFundsUpdatedBy    | Lecture seule             | -          |

## Enums

Aucune enumération disponible pour cette entité.

## 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 { getSeverancePayId } from '@fasstech/oip-core/entities/severancePay';
import { getStockFundsDistribution, getStockFundsIsin, getStockFundsLabel, getstockFundsId, setStockFundsDistribution, setStockFundsIsin, setStockFundsLabel } from '@fasstech/oip-core/entities/stockFunds';

(async () => {
  let ProjectEntity = await Entities('Project').get({ id: projectId });
  let OfferEntity = await Entities('Offer').create();
  let PensionEntity = await Entities('Pension').get(OfferEntity);
  let SeverancePayEntity = await Entities('SeverancePay').create();
  const StockFundsEntity = await Entities('StockFunds').create();
  
  setStockFundsDistribution(100, StockFundsEntity);
  setStockFundsIsin('isin', StockFundsEntity);
  setStockFundsLabel('label', StockFundsEntity);
  
  SeverancePayEntity = await Entities('StockFunds').save(SeverancePayEntity, StockFundsEntity);
  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));
  const StockFundsEntityToTest = await Entities('StockFunds').get(SeverancePayEntityToTest, getStockFundsId(StockFundsEntity));
  
  getStockFundsDistribution(StockFundsEntityToTest); // 100
  getStockFundsIsin(StockFundsEntityToTest); // 'isin'
  getStockFundsLabel(StockFundsEntityToTest); // 'label'
})();
```
