Svc
Svc
Description
L'entité SVC regroupe les informations nécessaires relatives aux services internes et externes de l'OAV.
Relations
Ascendantes
Entité | Propriété |
|---|---|
Project | svcs |
Descendantes
Entité | Propriété |
|---|---|
DigitalService | digitalServices |
History | history |
Propriétés
Nom | Type | Description | Validateur | Lecture seule ? | Dépréciée ? | DerniÚre version modifiée |
|---|---|---|---|---|---|---|
isExternal | Boolean | Indique s'il s'agit d'un service interne ou externe | ï»ż | ï»ż | ï»ż | 2.4.0 |
metadata | Json | Metadata du service X | ï»ż | ï»ż | ï»ż | 2.4.0 |
id | String | Identifiant de l'entitĂ© Svc | ï»ż | X | ï»ż | ï»ż |
code | String | Codification fonctionnelle de l'entitĂ© Svc | ï»ż | ï»ż | ï»ż | ï»ż |
externalId | String | Identifiant de l'entitĂ© Svc dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
externalCode | String | Codification fonctionnelle de l'entitĂ© Svc dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
svcId | String | Identifiant public de l'entitĂ© Svc dans l'OIP | ï»ż | ï»ż | ï»ż | ï»ż |
label | String | Information relative au nom de l'entitĂ© Svc dans son contexte d'utilisation | ï»ż | ï»ż | ï»ż | ï»ż |
createdAt | Date | Date de crĂ©ation de l'entitĂ© Svc | ï»ż | X | ï»ż | ï»ż |
updatedAt | Date | Date de modification de l'entitĂ© Svc | ï»ż | X | ï»ż | ï»ż |
Enumérations
Aucune enumération.
Enumérations génériques
Aucune enumération générique.
Exemple
import { Entities } from '@fasstech/oip-core';
import { getProjectId } from '@fasstech/oip-core/entities/Project';
import { getSvcCode, getSvcExternalCode, getSvcExternalId, getSvcId, getSvcIsExternal, getSvcLabel, getSvcMetadata, getSvcSvcId, setSvcCode, setSvcExternalCode, setSvcExternalId, setSvcIsExternal, setSvcLabel, setSvcMetadata, setSvcSvcId } from '@fasstech/oip-core/entities/Svc';
(async () => {
let project = await Entities('Project').create();
const svc = await Entities('Svc').create();
setSvcIsExternal(false, svc);
setSvcMetadata({ metadata: 'foo' }, svc);
setSvcCode('code', svc);
setSvcExternalId('externalId', svc);
setSvcExternalCode('externalCode', svc);
setSvcSvcId('svcId', svc);
setSvcLabel('label', svc);
project = await Entities('Svc').save(project, svc);
await Entities('Project').save(project);
const projectToTest = await Entities('Project').get({ id: getProjectId(project) });
const svcToTest = await Entities('Svc').get(projectToTest, { filter: ({ id }) => id === getSvcId(svc) });
getSvcIsExternal(svcToTest); // false
getSvcMetadata(svcToTest); // { metadata: 'foo' }
getSvcCode(svcToTest); // 'code'
getSvcExternalId(svcToTest); // 'externalId'
getSvcExternalCode(svcToTest); // 'externalCode'
getSvcSvcId(svcToTest); // 'svcId'
getSvcLabel(svcToTest); // 'label'
})();