---
title: Aml
slug: oip-next/ubnfk1jsccgajyovcdje
createdAt: 2024-02-21T13:45:39.000Z
---

# Aml

## Description

L'entité AML (Anti Money Laundering) permet de stocker les indicateurs de risque AML liés à la personne physique ou morale.

## Relations

### Ascendantes

| Entité   | Propriété |
| -------- | --------- |
| Company  | aml       |
| Contact  | aml       |
| Customer | aml       |
| Grantee  | aml       |
| Tns      | aml       |

### 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é `Aml`                                              | getAmlCreatedAt                    | Lecture seule                      | -          |
| createdBy                    | `String`  |                           | Utilisateur à l'origine de la création de l'entité `Aml`                        | getAmlCreatedBy                    | Lecture seule                      | -          |
| id                           | `String`  |                           | Identifiant unique de l'entité `Aml`                                            | getAmlId                           | Lecture seule                      | -          |
| isLegalEntity                | `Boolean` | 2.4.0                     | Indique s'il s'agit d'une personne morale.                                      | getAmlIsLegalEntity                | setAmlIsLegalEntity                | -          |
| isPoliticallyExposed         | `Boolean` | 2.4.0                     | Est un bénéficiaire exposé politiquement.                                       | getAmlIsPoliticallyExposed         | setAmlIsPoliticallyExposed         | -          |
| isRelationPoliticallyExposed | `Boolean` | 2.4.0                     | Est un bénéficiaire ayant une relation avec une personne exposée politiquement. | getAmlIsRelationPoliticallyExposed | setAmlIsRelationPoliticallyExposed | -          |
| updatedAt                    | `Date`    |                           | Date de modification de l'entité `Aml`                                          | getAmlUpdatedAt                    | Lecture seule                      | -          |
| updatedBy                    | `String`  |                           | Utilisateur à l'origine de la modification de l'entité `Aml`                    | getAmlUpdatedBy                    | Lecture seule                      | -          |

## Enums

Aucune enumération disponible pour cette entité.

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getAmlIsLegalEntity, getAmlIsPoliticallyExposed, getAmlIsRelationPoliticallyExposed, setAmlIsLegalEntity, setAmlIsPoliticallyExposed, setAmlIsRelationPoliticallyExposed } from '@fasstech/oip-core/entities/aml';
import { getCompanyId } from '@fasstech/oip-core/entities/company';
import { getProjectId } from '@fasstech/oip-core/entities/project';

(async () => {
  let ProjectEntity = await Entities('Project').get({ id: projectId });
  let CompanyEntity = await Entities('Company').create();
  const AmlEntity = await Entities('Aml').get(CompanyEntity);
  
  setAmlIsLegalEntity(false, AmlEntity);
  setAmlIsPoliticallyExposed(false, AmlEntity);
  setAmlIsRelationPoliticallyExposed(false, AmlEntity);
  
  CompanyEntity = await Entities('Aml').save(CompanyEntity, AmlEntity);
  ProjectEntity = await Entities('Company').save(ProjectEntity, CompanyEntity);
  await Entities('Project').save(ProjectEntity);
  
  const ProjectEntityToTest = await Entities('Project').get({ id: getProjectId(ProjectEntity) });
  const CompanyEntityToTest = await Entities('Company').get(ProjectEntityToTest, getCompanyId(CompanyEntity));
  const AmlEntityToTest = await Entities('Aml').get(CompanyEntityToTest);
  
  getAmlIsLegalEntity(AmlEntityToTest); // false
  getAmlIsPoliticallyExposed(AmlEntityToTest); // false
  getAmlIsRelationPoliticallyExposed(AmlEntityToTest); // false
})();
```
