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 |
Liste des propriétés
Nom | Type | DerniÚre version modifiée | Description | Getter | Setter | Deprecated |
|---|---|---|---|---|---|---|
beneficiary | WaiverDetailBeneficiaryEnum | 2.7.0 | Bénéficiaire de la structure tarifaire | getWaiverDetailBeneficiary | setWaiverDetailBeneficiary | - |
createdAt | Date | ï»ż | Date de crĂ©ation de l'entitĂ© WaiverDetail | getWaiverDetailCreatedAt | Lecture seule | - |
createdBy | String | ï»ż | Utilisateur Ă l'origine de la crĂ©ation de l'entitĂ© WaiverDetail | getWaiverDetailCreatedBy | Lecture seule | - |
id | String | ï»ż | Identifiant unique de l'entitĂ© WaiverDetail | getWaiverDetailId | Lecture seule | - |
rate | Number | 2.7.0 | Taux de remise ou de majoration | getWaiverDetailRate | setWaiverDetailRate | - |
updatedAt | Date | ï»ż | Date de modification de l'entitĂ© WaiverDetail | getWaiverDetailUpdatedAt | Lecture seule | - |
updatedBy | String | ï»ż | Utilisateur Ă l'origine de la modification de l'entitĂ© WaiverDetail | getWaiverDetailUpdatedBy | Lecture seule | - |
Enums
WaiverDetailBeneficiaryEnum
- WaiverDetailBeneficiaryEnum.ADULT
- WaiverDetailBeneficiaryEnum.ADULT_CHILD
- WaiverDetailBeneficiaryEnum.CHILD
- WaiverDetailBeneficiaryEnum.DUO
- WaiverDetailBeneficiaryEnum.EMPLOYEE
- WaiverDetailBeneficiaryEnum.FAMILY
- WaiverDetailBeneficiaryEnum.PARTNER
- WaiverDetailBeneficiaryEnum.TA
- WaiverDetailBeneficiaryEnum.TB
- WaiverDetailBeneficiaryEnum.TC
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, getWaiverDetailRate, getwaiverDetailId, setWaiverDetailBeneficiary, setWaiverDetailRate } 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 ProjectEntity = await Entities('Project').get({ id: projectId });
let OfferEntity = await Entities('Offer').create();
let HypothesisEntity = await Entities('Hypothesis').create();
let WaiverRequestEntity = await Entities('WaiverRequest').create();
let WaiverEntity = await Entities('Waiver').create();
const WaiverDetailEntity = await Entities('WaiverDetail').create();
setWaiverDetailBeneficiary(WaiverDetailBeneficiaryEnum.TB, WaiverDetailEntity);
setWaiverDetailRate(114, WaiverDetailEntity);
WaiverEntity = await Entities('WaiverDetail').save(WaiverEntity, WaiverDetailEntity);
WaiverRequestEntity = await Entities('Waiver').save(WaiverRequestEntity, WaiverEntity);
HypothesisEntity = await Entities('WaiverRequest').save(HypothesisEntity, WaiverRequestEntity);
OfferEntity = await Entities('Hypothesis').save(OfferEntity, HypothesisEntity);
ProjectEntity = await Entities('Offer').save(ProjectEntity, OfferEntity);
await Entities('Project').save(ProjectEntity);
const ProjectEntityToTest = await Entities('Project').get({ id: getProjectId(ProjectEntity) });
const OfferEntityToTest = await Entities('Offer').get(ProjectEntityToTest, getOfferId(OfferEntity));
const HypothesisEntityToTest = await Entities('Hypothesis').get(OfferEntityToTest, getHypothesisId(HypothesisEntity));
const WaiverRequestEntityToTest = await Entities('WaiverRequest').get(HypothesisEntityToTest, getWaiverRequestId(WaiverRequestEntity));
const WaiverEntityToTest = await Entities('Waiver').get(WaiverRequestEntityToTest, getWaiverId(WaiverEntity));
const WaiverDetailEntityToTest = await Entities('WaiverDetail').get(WaiverEntityToTest, getWaiverDetailId(WaiverDetailEntity));
getWaiverDetailBeneficiary(WaiverDetailEntityToTest); // WaiverDetailBeneficiaryEnum.TB
getWaiverDetailRate(WaiverDetailEntityToTest); // 114
})();