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

# Company

## Description

L'entité Company regroupe toutes les informations des entreprises.

## Relations

### Ascendantes

| Entité  | Propriété |
| ------- | --------- |
| Project | companies |

### Descendantes

| Entité         | Propriété        |
| -------------- | ---------------- |
| GDPR           | GDPRs            |
| ActivePolicy   | activePolicies   |
| Address        | addresses        |
| Aml            | amls             |
| BankAccount    | bankAccounts     |
| Demography     | demographies     |
| Email          | emails           |
| FinanceCompany | financeCompanies |
| History        | history          |
| LegalProfile   | legalProfiles    |
| OfferNode      | offerNodes       |
| Phone          | phones           |

## Propriétés

| Nom                            | Type              | Description                                                                                                           | Validateur | Lecture seule ? | Dépréciée ? | Dernière version modifiée |
| ------------------------------ | ----------------- | --------------------------------------------------------------------------------------------------------------------- | ---------- | --------------- | ----------- | ------------------------- |
| acronym                        | `String`          | Acronyme                                                                                                              |            |                 |             | 2.4.0                     |
| ape                            | `String`          | Code APE de l'entreprise                                                                                              |            |                 |             | 2.0.0                     |
| ccnId                          | `String`          | Identifiant de la convention collective de l'entreprise                                                               |            |                 |             | 2.1.1                     |
| ccnName                        | `String`          | Nom de la convention collective de l'entreprise                                                                       |            |                 |             | 2.1.1                     |
| ccnRef                         | `String`          | Référence de la convention collective de l'entreprise                                                                 |            |                 |             | 2.1.1                     |
| creationDate                   | `Date`            | Date de création de l'entreprise                                                                                      |            |                 |             | 2.0.0                     |
| hasEducationAnnuityBeneficiary | `Boolean`         | La société déclare avoir des bénéficiaires d'une rente éducation                                                      |            |                 |             | 1.6.0                     |
| hasHealthContract              | `Boolean`         | La société est actuellement couverte par un contrat de santé                                                          |            |                 |             | 1.6.0                     |
| hasIncapacitedEmployee         | `Boolean`         | Indique si l'entreprise a des employés en incapacité                                                                  |            |                 |             | 1.6.0                     |
| hasProtectionContract          | `Boolean`         | La société est actuellement couverte par un contrat de prévoyance                                                     |            |                 |             | 1.6.0                     |
| individualName                 | `String`          | Nom de l'entreprise individuelle                                                                                      |            |                 |             | 2.0.0                     |
| isClosed                       | `Boolean`         | Il s'agit de savoir si l'établissement est fermé ou non                                                               |            |                 |             | 2.18.0                    |
| isInCreation                   | `Boolean`         | Indique si l'entreprise est en cours de création                                                                      |            |                 |             | 1.6.0                     |
| legalForm                      | `String`          | Forme juridique de l'entreprise                                                                                       |            |                 |             | 2.0.0                     |
| naf                            | `String`          | Code NAF de l'entreprise                                                                                              |            |                 |             | 2.0.0                     |
| name                           | `String`          | Nom de l'entreprise                                                                                                   |            |                 |             | 1.5.0                     |
| siren                          | `String`          | Numéro SIREN de l'entreprise                                                                                          |            |                 |             | 2.0.0                     |
| siret                          | `String`          | Numéro SIRET de l'entreprise                                                                                          |            |                 |             | 2.0.0                     |
| type                           | `CompanyTypeEnum` | Type d'entreprise : HEAD\_OFFICE, FOREIGN\_HEAD\_OFFICE, WITHOUT\_LOCAL\_ESTABLISHMENT, STAND\_ALONE, MOST\_EMPLOYEES |            |                 |             | 2.1.1                     |
| website                        | `String`          | Site web de l'établissement                                                                                           |            |                 |             | 2.4.0                     |
| id                             | `String`          | Identifiant de l'entité `Company`                                                                                     |            | X               |             |                           |
| code                           | `String`          | Codification fonctionnelle de l'entité `Company`                                                                      |            |                 |             |                           |
| externalId                     | `String`          | Identifiant de l'entité `Company` dans le système client                                                              |            |                 |             |                           |
| externalCode                   | `String`          | Codification fonctionnelle de l'entité `Company` dans le système client                                               |            |                 |             |                           |
| companyId                      | `String`          | Identifiant public de l'entité `Company` dans l'OIP                                                                   |            |                 |             |                           |
| label                          | `String`          | Information relative au nom de l'entité `Company` dans son contexte d'utilisation                                     |            |                 |             |                           |
| createdAt                      | `Date`            | Date de création de l'entité `Company`                                                                                |            | X               |             |                           |
| updatedAt                      | `Date`            | Date de modification de l'entité `Company`                                                                            |            | X               |             |                           |

## Enumérations

### CompanyTypeEnum

- `FOREIGN_HEAD_OFFICE`
- `HEAD_OFFICE`
- `MOST_EMPLOYEES`
- `STAND_ALONE`
- `WITHOUT_LOCAL_ESTABLISHMENT`

## Enumérations génériques

Aucune enumération générique.

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getCompanyAcronym, getCompanyApe, getCompanyCcnId, getCompanyCcnName, getCompanyCcnRef, getCompanyCode, getCompanyCompanyId, getCompanyCreationDate, getCompanyExternalCode, getCompanyExternalId, getCompanyHasEducationAnnuityBeneficiary, getCompanyHasHealthContract, getCompanyHasIncapacitedEmployee, getCompanyHasProtectionContract, getCompanyId, getCompanyIndividualName, getCompanyIsClosed, getCompanyIsInCreation, getCompanyLabel, getCompanyLegalForm, getCompanyNaf, getCompanyName, getCompanySiren, getCompanySiret, getCompanyType, getCompanyWebsite, setCompanyAcronym, setCompanyApe, setCompanyCcnId, setCompanyCcnName, setCompanyCcnRef, setCompanyCode, setCompanyCompanyId, setCompanyCreationDate, setCompanyExternalCode, setCompanyExternalId, setCompanyHasEducationAnnuityBeneficiary, setCompanyHasHealthContract, setCompanyHasIncapacitedEmployee, setCompanyHasProtectionContract, setCompanyIndividualName, setCompanyIsClosed, setCompanyIsInCreation, setCompanyLabel, setCompanyLegalForm, setCompanyNaf, setCompanyName, setCompanySiren, setCompanySiret, setCompanyType, setCompanyWebsite } from '@fasstech/oip-core/entities/Company';
import { CompanyTypeEnum } from '@fasstech/oip-core/entities/Company/enums';
import { getProjectId } from '@fasstech/oip-core/entities/Project';

(async () => {
  let project = await Entities('Project').create();
  const company = await Entities('Company').create();
  
  setCompanyAcronym('acronym', company);
  setCompanyApe('ape', company);
  setCompanyCcnId('ccnId', company);
  setCompanyCcnName('ccnName', company);
  setCompanyCcnRef('ccnRef', company);
  setCompanyCreationDate(new Date('2017-01-01'), company);
  setCompanyHasEducationAnnuityBeneficiary(true, company);
  setCompanyHasHealthContract(true, company);
  setCompanyHasIncapacitedEmployee(true, company);
  setCompanyHasProtectionContract(true, company);
  setCompanyIndividualName('individualName', company);
  setCompanyIsClosed(false, company);
  setCompanyIsInCreation(false, company);
  setCompanyLegalForm('legalForm', company);
  setCompanyNaf('naf', company);
  setCompanyName('name', company);
  setCompanySiren('siren', company);
  setCompanySiret('siret', company);
  setCompanyType(CompanyTypeEnum.HEAD_OFFICE, company);
  setCompanyWebsite('website', company);
  setCompanyCode('code', company);
  setCompanyExternalId('externalId', company);
  setCompanyExternalCode('externalCode', company);
  setCompanyCompanyId('companyId', company);
  setCompanyLabel('label', company);
  
  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) });
  
  getCompanyAcronym(companyToTest); // 'acronym'
  getCompanyApe(companyToTest); // 'ape'
  getCompanyCcnId(companyToTest); // 'ccnId'
  getCompanyCcnName(companyToTest); // 'ccnName'
  getCompanyCcnRef(companyToTest); // 'ccnRef'
  getCompanyCreationDate(companyToTest); // new Date('2017-01-01')
  getCompanyHasEducationAnnuityBeneficiary(companyToTest); // true
  getCompanyHasHealthContract(companyToTest); // true
  getCompanyHasIncapacitedEmployee(companyToTest); // true
  getCompanyHasProtectionContract(companyToTest); // true
  getCompanyIndividualName(companyToTest); // 'individualName'
  getCompanyIsClosed(companyToTest); // false
  getCompanyIsInCreation(companyToTest); // false
  getCompanyLegalForm(companyToTest); // 'legalForm'
  getCompanyNaf(companyToTest); // 'naf'
  getCompanyName(companyToTest); // 'name'
  getCompanySiren(companyToTest); // 'siren'
  getCompanySiret(companyToTest); // 'siret'
  getCompanyType(companyToTest); // CompanyTypeEnum.HEAD_OFFICE
  getCompanyWebsite(companyToTest); // 'website'
  getCompanyCode(companyToTest); // 'code'
  getCompanyExternalId(companyToTest); // 'externalId'
  getCompanyExternalCode(companyToTest); // 'externalCode'
  getCompanyCompanyId(companyToTest); // 'companyId'
  getCompanyLabel(companyToTest); // 'label'
})();
```
