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

# WaiverDetail

## Description

L'entité WaiverDetail contient les bénéficiaires d'une structure tarifaire avec le taux de majoration ou de remise.

## Relations

### Ascendantes

| Entité | Propriété     |
| ------ | ------------- |
| Waiver | waiverDetails |

### Descendantes

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

## Propriétés

| Nom            | Type                          | Description                                                                            | Validateur | Lecture seule ? | Dépréciée ? | Dernière version modifiée |
| -------------- | ----------------------------- | -------------------------------------------------------------------------------------- | ---------- | --------------- | ----------- | ------------------------- |
| beneficiary    | `WaiverDetailBeneficiaryEnum` | Bénéficiaire de la structure tarifaire                                                 |            |                 |             | 2.7.0                     |
| rate           | `Number`                      | Taux de remise ou de majoration                                                        |            |                 |             | 2.7.0                     |
| id             | `String`                      | Identifiant de l'entité `WaiverDetail`                                                 |            | X               |             |                           |
| code           | `String`                      | Codification fonctionnelle de l'entité `WaiverDetail`                                  |            |                 |             |                           |
| externalId     | `String`                      | Identifiant de l'entité `WaiverDetail` dans le système client                          |            |                 |             |                           |
| externalCode   | `String`                      | Codification fonctionnelle de l'entité `WaiverDetail` dans le système client           |            |                 |             |                           |
| waiverDetailId | `String`                      | Identifiant public de l'entité `WaiverDetail` dans l'OIP                               |            |                 |             |                           |
| label          | `String`                      | Information relative au nom de l'entité `WaiverDetail` dans son contexte d'utilisation |            |                 |             |                           |
| createdAt      | `Date`                        | Date de création de l'entité `WaiverDetail`                                            |            | X               |             |                           |
| updatedAt      | `Date`                        | Date de modification de l'entité `WaiverDetail`                                        |            | X               |             |                           |

## Enumérations

### WaiverDetailBeneficiaryEnum

- `ADULT`
- `ADULT_CHILD`
- `CHILD`
- `DUO`
- `EMPLOYEE`
- `FAMILY`
- `PARTNER`
- `TA`
- `TB`
- `TC`

## Enumérations génériques

Aucune enumération générique.

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getHypothesisId } from '@fasstech/oip-core/entities/Hypothesis';
import { getOfferId } from '@fasstech/oip-core/entities/Offer';
import { getProjectId } from '@fasstech/oip-core/entities/Project';
import { getWaiverId } from '@fasstech/oip-core/entities/Waiver';
import { getWaiverDetailBeneficiary, getWaiverDetailCode, getWaiverDetailExternalCode, getWaiverDetailExternalId, getWaiverDetailId, getWaiverDetailLabel, getWaiverDetailRate, getWaiverDetailWaiverDetailId, setWaiverDetailBeneficiary, setWaiverDetailCode, setWaiverDetailExternalCode, setWaiverDetailExternalId, setWaiverDetailLabel, setWaiverDetailRate, setWaiverDetailWaiverDetailId } from '@fasstech/oip-core/entities/WaiverDetail';
import { WaiverDetailBeneficiaryEnum } from '@fasstech/oip-core/entities/WaiverDetail/enums';
import { getWaiverRequestId } from '@fasstech/oip-core/entities/WaiverRequest';

(async () => {
  let project = await Entities('Project').create();
  let offer = await Entities('Offer').create();
  let hypothesis = await Entities('Hypothesis').create();
  let waiverRequest = await Entities('WaiverRequest').create();
  let waiver = await Entities('Waiver').create();
  const waiverDetail = await Entities('WaiverDetail').create();
  
  setWaiverDetailBeneficiary(WaiverDetailBeneficiaryEnum.TB, waiverDetail);
  setWaiverDetailRate(114, waiverDetail);
  setWaiverDetailCode('code', waiverDetail);
  setWaiverDetailExternalId('externalId', waiverDetail);
  setWaiverDetailExternalCode('externalCode', waiverDetail);
  setWaiverDetailWaiverDetailId('waiverDetailId', waiverDetail);
  setWaiverDetailLabel('label', waiverDetail);
  
  waiver = await Entities('WaiverDetail').save(waiver, waiverDetail);
  waiverRequest = await Entities('Waiver').save(waiverRequest, waiver);
  hypothesis = await Entities('WaiverRequest').save(hypothesis, waiverRequest);
  offer = await Entities('Hypothesis').save(offer, hypothesis);
  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 hypothesisToTest = await Entities('Hypothesis').get(offerToTest, { filter: ({ id }) => id === getHypothesisId(hypothesis) });
  const waiverRequestToTest = await Entities('WaiverRequest').get(hypothesisToTest, { filter: ({ id }) => id === getWaiverRequestId(waiverRequest) });
  const waiverToTest = await Entities('Waiver').get(waiverRequestToTest, { filter: ({ id }) => id === getWaiverId(waiver) });
  const waiverDetailToTest = await Entities('WaiverDetail').get(waiverToTest, { filter: ({ id }) => id === getWaiverDetailId(waiverDetail) });
  
  getWaiverDetailBeneficiary(waiverDetailToTest); // WaiverDetailBeneficiaryEnum.TB
  getWaiverDetailRate(waiverDetailToTest); // 114
  getWaiverDetailCode(waiverDetailToTest); // 'code'
  getWaiverDetailExternalId(waiverDetailToTest); // 'externalId'
  getWaiverDetailExternalCode(waiverDetailToTest); // 'externalCode'
  getWaiverDetailWaiverDetailId(waiverDetailToTest); // 'waiverDetailId'
  getWaiverDetailLabel(waiverDetailToTest); // 'label'
})();
```
