GDPR
GDPR
Description
L'entitĂ© GDPR regroupe les informations relatives au consentement RGPD dâune personne.
Relations
Ascendantes
Entité | Propriété |
|---|---|
Company | GDPRs |
Contact | GDPRs |
Customer | GDPRs |
Employee | GDPRs |
Grantee | GDPRs |
Tns | GDPRs |
User | GDPRs |
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Ă© GDPR | getGDPRCreatedAt | Lecture seule | - |
createdBy | String | ï»ż | Utilisateur Ă l'origine de la crĂ©ation de l'entitĂ© GDPR | getGDPRCreatedBy | Lecture seule | - |
date | Date | ï»ż | Date du consentement de l'utilisateur | getGDPRDate | setGDPRDate | - |
id | String | ï»ż | Identifiant unique de l'entitĂ© GDPR | getGDPRId | Lecture seule | - |
isConsent | Boolean | ï»ż | Indique si l'utilisateur donne son consentement RGPD | getGDPRIsConsent | setGDPRIsConsent | - |
updatedAt | Date | ï»ż | Date de modification de l'entitĂ© GDPR | getGDPRUpdatedAt | Lecture seule | - |
updatedBy | String | ï»ż | Utilisateur Ă l'origine de la modification de l'entitĂ© GDPR | getGDPRUpdatedBy | Lecture seule | - |
Enums
Aucune enumération disponible pour cette entité.
Exemple
import { Entities } from '@fasstech/oip-core';
import { getGDPRDate, getGDPRId, getGDPRIsConsent, setGDPRDate, setGDPRIsConsent } from '@fasstech/oip-core/entities/GDPR';
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 GDPREntity = await Entities('GDPR').create();
setGDPRDate(new Date('2017-01-01'), GDPREntity);
setGDPRIsConsent(false, GDPREntity);
CompanyEntity = await Entities('GDPR').save(CompanyEntity, GDPREntity);
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 GDPREntityToTest = await Entities('GDPR').get(CompanyEntityToTest, getGDPRId(GDPREntity));
getGDPRDate(GDPREntityToTest); // new Date('2017-01-01')
getGDPRIsConsent(GDPREntityToTest); // false
})();