79 lines
1.6 KiB
TypeScript
79 lines
1.6 KiB
TypeScript
import { ReferenceFieldDataType } from "@app/core/common/enum/reference-field-data-type";
|
|
import { ReferenceSourceType } from "@app/core/common/enum/reference-source-type";
|
|
import { ReferenceType } from "@app/core/common/enum/reference-type";
|
|
import { UUID } from "crypto";
|
|
import { DmpModel } from "../dmp/dmp";
|
|
import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model";
|
|
|
|
export interface Reference extends BaseEntity{
|
|
label: string;
|
|
type: ReferenceType;
|
|
description: string;
|
|
definition: Definition;
|
|
reference: string;
|
|
abbreviation: string;
|
|
source: string;
|
|
sourceType: ReferenceSourceType;
|
|
dmpReferences: DmpReference[];
|
|
}
|
|
|
|
export interface Definition {
|
|
fields: Field[];
|
|
}
|
|
|
|
export interface Field {
|
|
code: string;
|
|
dataType: ReferenceFieldDataType;
|
|
value: string;
|
|
}
|
|
|
|
export interface DmpReference {
|
|
id: UUID;
|
|
dmp: DmpModel;
|
|
reference: Reference;
|
|
data: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
}
|
|
|
|
// old fetcher
|
|
export interface FetcherReference {
|
|
id: string;
|
|
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
|
|
|
|
export interface ReferencePersist extends BaseEntityPersist {
|
|
label: string;
|
|
type: ReferenceType;
|
|
description: string;
|
|
definition?: DefinitionPersist;
|
|
reference: string;
|
|
abbreviation: string;
|
|
source: string;
|
|
sourceType: ReferenceSourceType;
|
|
}
|
|
|
|
export interface DefinitionPersist {
|
|
fields: FieldPersist[];
|
|
}
|
|
|
|
export interface FieldPersist {
|
|
code: string;
|
|
dataType: ReferenceFieldDataType;
|
|
value: string;
|
|
} |