WaiverDetail
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
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'
})();