2023-10-27 17:56:19 +02:00
|
|
|
import { ReferenceFieldDataType } from "@app/core/common/enum/reference-field-data-type";
|
2023-10-27 17:29:06 +02:00
|
|
|
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";
|
2024-02-09 21:46:05 +01:00
|
|
|
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;
|
2023-10-27 17:59:51 +02:00
|
|
|
sourceType: ReferenceSourceType;
|
2023-10-26 11:08:45 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 16:35:35 +02:00
|
|
|
export interface Definition {
|
|
|
|
fields: Field[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Field {
|
|
|
|
code: string;
|
2023-10-27 17:56:19 +02:00
|
|
|
dataType: ReferenceFieldDataType;
|
|
|
|
value: string;
|
2023-10-27 16:35:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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;
|
2023-10-27 16:35:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Persist
|
|
|
|
|
2023-11-24 18:12:39 +01:00
|
|
|
export interface ReferencePersist extends BaseEntityPersist {
|
2023-10-27 17:56:19 +02:00
|
|
|
label: string;
|
2024-02-09 21:46:05 +01:00
|
|
|
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;
|
2023-10-27 17:59:51 +02:00
|
|
|
sourceType: ReferenceSourceType;
|
2023-10-27 16:35:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DefinitionPersist {
|
2023-11-24 18:12:39 +01:00
|
|
|
fields: FieldPersist[];
|
2023-10-27 16:35:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|