---
title: OSCommonProps
slug: oip-next/k1fk-o
icon: {"lucideIcon":"📘"}
createdAt: 2024-10-16T07:12:00.000Z
---

# OSCommonProps

## Description

La sous entité OSCommonProps représente les propriétés communes à toute l'offre.

## Relations

### Ascendantes

| Entité    | Propriété     |
| --------- | ------------- |
| OfferNode | oSCommonProps |

### Descendantes

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

## Propriétés

| Nom                     | Type                                       | Description                                                                                                                     | Validateur | Lecture seule ? | Dépréciée ? | Dernière version modifiée |
| ----------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------- | ----------- | ------------------------- |
| beneficiariesEnrollment | `OSCommonPropsBeneficiariesEnrollmentEnum` | Indique si et comment la part employeur s'applique aux ayants droit. [OSCommonPropsBeneficiariesEnrollmentEnum](#)              |            |                 |             | 3.9.0                     |
| college                 | `OSCommonPropsCollegeEnum`                 | Collège. [OSCommonPropsCollegeEnum](#)                                                                                          |            |                 |             | 3.4.2                     |
| contributionStructure   | `String`                                   | Structure de cotisations associé au nœud. Valeur libre pour le PERco.                                                           |            |                 |             | 3.5.2                     |
| effectDate              | `Date`                                     | Date de prise d'effet de l'offre.                                                                                               |            |                 |             | 3.1.0                     |
| employerPercentShare    | `Number`                                   | Part de l'employeur en poucentage.                                                                                              |            |                 |             | 3.9.0                     |
| isConformCCN            | `Boolean`                                  | Indique la conformité de la formule par rapport à la CCN corrélée.                                                              |            |                 |             | 3.9.0                     |
| isMinimaCCN             | `Boolean`                                  | Indique si la formule respecte les minima CCN requis.                                                                           |            |                 |             | 3.9.0                     |
| isPreSelected           | `Boolean`                                  | Il s'agit d'identifier les formules et/ou garanties présélectionnées pour l'utilisateur pour permettre de faire une comparaison |            |                 |             | 3.7.0                     |
| isRecommended           | `Boolean`                                  | Indique si l'offre est recommandée.                                                                                             |            |                 |             | 3.1.0                     |
| isSelected              | `Boolean`                                  | Indique si l'offre est choisie.                                                                                                 |            |                 |             | 3.1.0                     |
| metadata                | `Json`                                     | Métadonnées complètes ou partielles issues de FlexiProduct.                                                                     |            |                 |             | 3.19.0                    |
| regime                  | `OSCommonPropsRegimeEnum`                  | Régime. [OSCommonPropsRegimeEnum](#)                                                                                            |            |                 |             | 3.4.2                     |
| status                  | `String`                                   | Statut du nœud.                                                                                                                 |            |                 |             | 3.5.2                     |
| typologyFamily          | `OSCommonPropsTypologyFamilyEnum`          | Type de structure tarifaire. [OSCommonPropsTypologyFamilyEnum](#)                                                               |            |                 |             | 3.10.0                    |
| id                      | `String`                                   | Identifiant de l'entité `OSCommonProps`                                                                                         |            | X               |             |                           |
| code                    | `String`                                   | Codification fonctionnelle de l'entité `OSCommonProps`                                                                          |            |                 |             |                           |
| externalId              | `String`                                   | Identifiant de l'entité `OSCommonProps` dans le système client                                                                  |            |                 |             |                           |
| externalCode            | `String`                                   | Codification fonctionnelle de l'entité `OSCommonProps` dans le système client                                                   |            |                 |             |                           |
| oSCommonPropsId         | `String`                                   | Identifiant public de l'entité `OSCommonProps` dans l'OIP                                                                       |            |                 |             |                           |
| label                   | `String`                                   | Information relative au nom de l'entité `OSCommonProps` dans son contexte d'utilisation                                         |            |                 |             |                           |
| createdAt               | `Date`                                     | Date de création de l'entité `OSCommonProps`                                                                                    |            | X               |             |                           |
| createdBy               | `String`                                   | Responsable de la création de l'entité `OSCommonProps`                                                                          |            |                 |             |                           |
| updatedAt               | `Date`                                     | Date de modification de l'entité `OSCommonProps`                                                                                |            | X               |             |                           |
| updatedBy               | `String`                                   | Responsable de la dernière mise à jour de l'entité `OSCommonProps`                                                              |            |                 |             |                           |

## Enumérations

### OSCommonPropsBeneficiariesEnrollmentEnum

- `NONE`
- `MANDATORY_ENROLLMENT`
- `OPTIONAL_ENROLLMENT`

### OSCommonPropsCollegeEnum

- `ALL`
- `EMPLOYEES`
- `EXECUTIVE_EMPLOYEES`

### OSCommonPropsRegimeEnum

- `REGIME_AGRICOLE`
- `REGIME_GLOBAL`
- `REGIME_INDEPENDANT`
- `REGIME_LOCAL`

### OSCommonPropsTypologyFamilyEnum

- `EMPLOYEE_CHILD`
- `EMPLOYEE_DUO_FAMILY`
- `EMPLOYEE_FAMILY`
- `EMPLOYEE_PARTNER_CHILD`
- `FAMILY`

## Enumérations génériques

Aucune enumération générique.

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getCompanyId } from '@fasstech/oip-core/entities/Company';
import { getOSCommonPropsBeneficiariesEnrollment, getOSCommonPropsCode, getOSCommonPropsCollege, getOSCommonPropsContributionStructure, getOSCommonPropsCreatedBy, getOSCommonPropsEffectDate, getOSCommonPropsEmployerPercentShare, getOSCommonPropsExternalCode, getOSCommonPropsExternalId, getOSCommonPropsId, getOSCommonPropsIsConformCCN, getOSCommonPropsIsMinimaCCN, getOSCommonPropsIsPreSelected, getOSCommonPropsIsRecommended, getOSCommonPropsIsSelected, getOSCommonPropsLabel, getOSCommonPropsMetadata, getOSCommonPropsOSCommonPropsId, getOSCommonPropsRegime, getOSCommonPropsStatus, getOSCommonPropsTypologyFamily, getOSCommonPropsUpdatedBy, setOSCommonPropsBeneficiariesEnrollment, setOSCommonPropsCode, setOSCommonPropsCollege, setOSCommonPropsContributionStructure, setOSCommonPropsCreatedBy, setOSCommonPropsEffectDate, setOSCommonPropsEmployerPercentShare, setOSCommonPropsExternalCode, setOSCommonPropsExternalId, setOSCommonPropsIsConformCCN, setOSCommonPropsIsMinimaCCN, setOSCommonPropsIsPreSelected, setOSCommonPropsIsRecommended, setOSCommonPropsIsSelected, setOSCommonPropsLabel, setOSCommonPropsMetadata, setOSCommonPropsOSCommonPropsId, setOSCommonPropsRegime, setOSCommonPropsStatus, setOSCommonPropsTypologyFamily, setOSCommonPropsUpdatedBy } from '@fasstech/oip-core/entities/OSCommonProps';
import { OSCommonPropsBeneficiariesEnrollmentEnum, OSCommonPropsCollegeEnum, OSCommonPropsRegimeEnum, OSCommonPropsTypologyFamilyEnum } from '@fasstech/oip-core/entities/OSCommonProps/enums';
import { getOfferNodeId } from '@fasstech/oip-core/entities/OfferNode';
import { getProjectId } from '@fasstech/oip-core/entities/Project';

(async () => {
  let project = await Entities('Project').create();
  let company = await Entities('Company').create();
  let offerNode = await Entities('OfferNode').create();
  const oSCommonProps = await Entities('OSCommonProps').create();
  
  setOSCommonPropsBeneficiariesEnrollment(OSCommonPropsBeneficiariesEnrollmentEnum.OPTIONAL_ENROLLMENT, oSCommonProps);
  setOSCommonPropsCollege(OSCommonPropsCollegeEnum.ALL, oSCommonProps);
  setOSCommonPropsContributionStructure('contributionStructure', oSCommonProps);
  setOSCommonPropsEffectDate(new Date('2017-01-01'), oSCommonProps);
  setOSCommonPropsEmployerPercentShare(101, oSCommonProps);
  setOSCommonPropsIsConformCCN(false, oSCommonProps);
  setOSCommonPropsIsMinimaCCN(false, oSCommonProps);
  setOSCommonPropsIsPreSelected(false, oSCommonProps);
  setOSCommonPropsIsRecommended(false, oSCommonProps);
  setOSCommonPropsIsSelected(false, oSCommonProps);
  setOSCommonPropsMetadata({ metadata: 'foo' }, oSCommonProps);
  setOSCommonPropsRegime(OSCommonPropsRegimeEnum.REGIME_INDEPENDANT, oSCommonProps);
  setOSCommonPropsStatus('status', oSCommonProps);
  setOSCommonPropsTypologyFamily(OSCommonPropsTypologyFamilyEnum.EMPLOYEE_DUO_FAMILY, oSCommonProps);
  setOSCommonPropsCode('code', oSCommonProps);
  setOSCommonPropsExternalId('externalId', oSCommonProps);
  setOSCommonPropsExternalCode('externalCode', oSCommonProps);
  setOSCommonPropsOSCommonPropsId('oSCommonPropsId', oSCommonProps);
  setOSCommonPropsLabel('label', oSCommonProps);
  setOSCommonPropsCreatedBy('createdBy', oSCommonProps);
  setOSCommonPropsUpdatedBy('updatedBy', oSCommonProps);
  
  offerNode = await Entities('OSCommonProps').save(offerNode, oSCommonProps);
  company = await Entities('OfferNode').save(company, offerNode);
  project = await Entities('Company').save(project, company);
  await Entities('Project').save(project);
  
  const projectToTest = await Entities('Project').get({ id: getProjectId(project) });
  const companyToTest = await Entities('Company').get(projectToTest, { filter: ({ id }) => id === getCompanyId(company) });
  const offerNodeToTest = await Entities('OfferNode').get(companyToTest, { filter: ({ id }) => id === getOfferNodeId(offerNode) });
  const oSCommonPropsToTest = await Entities('OSCommonProps').get(offerNodeToTest, { filter: ({ id }) => id === getOSCommonPropsId(oSCommonProps) });
  
  getOSCommonPropsBeneficiariesEnrollment(oSCommonPropsToTest); // OSCommonPropsBeneficiariesEnrollmentEnum.OPTIONAL_ENROLLMENT
  getOSCommonPropsCollege(oSCommonPropsToTest); // OSCommonPropsCollegeEnum.ALL
  getOSCommonPropsContributionStructure(oSCommonPropsToTest); // 'contributionStructure'
  getOSCommonPropsEffectDate(oSCommonPropsToTest); // new Date('2017-01-01')
  getOSCommonPropsEmployerPercentShare(oSCommonPropsToTest); // 101
  getOSCommonPropsIsConformCCN(oSCommonPropsToTest); // false
  getOSCommonPropsIsMinimaCCN(oSCommonPropsToTest); // false
  getOSCommonPropsIsPreSelected(oSCommonPropsToTest); // false
  getOSCommonPropsIsRecommended(oSCommonPropsToTest); // false
  getOSCommonPropsIsSelected(oSCommonPropsToTest); // false
  getOSCommonPropsMetadata(oSCommonPropsToTest); // { metadata: 'foo' }
  getOSCommonPropsRegime(oSCommonPropsToTest); // OSCommonPropsRegimeEnum.REGIME_INDEPENDANT
  getOSCommonPropsStatus(oSCommonPropsToTest); // 'status'
  getOSCommonPropsTypologyFamily(oSCommonPropsToTest); // OSCommonPropsTypologyFamilyEnum.EMPLOYEE_DUO_FAMILY
  getOSCommonPropsCode(oSCommonPropsToTest); // 'code'
  getOSCommonPropsExternalId(oSCommonPropsToTest); // 'externalId'
  getOSCommonPropsExternalCode(oSCommonPropsToTest); // 'externalCode'
  getOSCommonPropsOSCommonPropsId(oSCommonPropsToTest); // 'oSCommonPropsId'
  getOSCommonPropsLabel(oSCommonPropsToTest); // 'label'
  getOSCommonPropsCreatedBy(oSCommonPropsToTest); // 'createdBy'
  getOSCommonPropsUpdatedBy(oSCommonPropsToTest); // 'updatedBy'
})();
```
