import { ReferenceType } from "@app/core/common/enum/reference-type"; import { IsActive } from "@app/core/common/enum/is-active.enum"; import { SourceType } from "@app/core/common/enum/source-type"; import { UUID } from "crypto"; import { DmpModel } from "../dmp/dmp"; import { ReferenceFieldDataType } from "@app/core/common/enum/reference-field-data-type"; export interface Reference { id: UUID; label: string; type: ReferenceType; description: string; definition: Definition; reference: string; abbreviation: string; source: string; sourceType: SourceType; isActive: IsActive; createdAt: Date; updatedAt: Date; 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 { id: UUID; label: string; type: ReferenceType; description: string; definition: DefinitionPersist; reference: string; abbreviation: string; source: string; sourceType: SourceType; } export interface DefinitionPersist { fields?: FieldPersist[]; } export interface FieldPersist { code: string; dataType: ReferenceFieldDataType; value: string; }