argos/dmp-frontend/src/app/core/model/reference/reference.ts

68 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-10-27 17:56:19 +02:00
import { ReferenceFieldDataType } from "@app/core/common/enum/reference-field-data-type";
import { ReferenceSourceType } from "@app/core/common/enum/reference-source-type";
2023-11-24 18:12:39 +01:00
import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model";
import { ReferenceType } from "../reference-type/reference-type";
import { Guid } from "@common/types/guid";
2023-10-26 11:08:45 +02:00
2023-12-29 16:04:16 +01:00
export interface Reference extends BaseEntity {
2023-10-27 17:56:19 +02:00
label: string;
type: ReferenceType;
description: string;
definition: Definition;
reference: string;
abbreviation: string;
source: string;
sourceType: ReferenceSourceType;
2023-10-26 11:08:45 +02:00
}
export interface Definition {
fields: Field[];
}
export interface Field {
code: string;
2023-10-27 17:56:19 +02:00
dataType: ReferenceFieldDataType;
value: string;
}
// old fetcher
2023-10-26 13:38:18 +02:00
export interface FetcherReference {
2023-10-20 16:44:41 +02:00
id: string;
2023-10-27 17:56:19 +02:00
name: string;
pid: string;
pidTypeField: string;
uri: string;
description: string;
source: string;
count: string;
path: string;
host: string;
types: string;
firstName: string;
lastName: string;
tag: string;
}
// Persist
2023-11-24 18:12:39 +01:00
export interface ReferencePersist extends BaseEntityPersist {
2023-10-27 17:56:19 +02:00
label: string;
typeId: Guid;
2023-10-27 17:56:19 +02:00
description: string;
2023-12-28 16:18:49 +01:00
definition: DefinitionPersist;
2023-10-27 17:56:19 +02:00
reference: string;
abbreviation: string;
source: string;
sourceType: ReferenceSourceType;
}
export interface DefinitionPersist {
2023-11-24 18:12:39 +01:00
fields: FieldPersist[];
}
export interface FieldPersist {
code: string;
2023-10-27 17:56:19 +02:00
dataType: ReferenceFieldDataType;
value: string;
2023-10-20 16:44:41 +02:00
}