import { DmpStatus } from '@app/core/common/enum/dmp-status'; import { DatasetWizardModel } from '../dataset/dataset-wizard'; import { FunderModel } from "../funder/funder"; import { GrantListingModel } from "../grant/grant-listing"; import { OrganizationModel } from "../organisation/organization"; import { ProjectModel } from "../project/project"; import { ResearcherModel } from "../researcher/researcher"; import { User, UserModel } from "../user/user"; import { UserInfoListingModel } from "../user/user-info-listing"; import { DmpDatasetProfile } from "./dmp-dataset-profile/dmp-dataset-profile"; import { DmpDynamicField } from "./dmp-dynamic-field"; import { DmpExtraField } from "./dmp-extra-field"; import { BaseEntity, BaseEntityPersist } from '@common/base/base-entity.model'; import { Description } from '../description/description'; import { DmpReference, ReferencePersist } from '../reference/reference'; import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status'; import { DmpAccessType } from '@app/core/common/enum/dmp-access-type'; import { DmpUserRole } from '@app/core/common/enum/dmp-user-role'; import { Guid } from '@common/types/guid'; import { DescriptionTemplate } from '../description-template/description-template'; import { EntityDoi } from '../entity-doi/entity-doi'; export interface DmpModel { //TODO: Delete id: string; label: string; groupId: String; profile: DmpBlueprint; version: number; status: DmpStatus; lockable: boolean; description: String; grant: GrantListingModel; project: ProjectModel; funder: FunderModel; datasets: DatasetWizardModel[]; datasetsToBeFinalized: string[]; profiles: DmpDatasetProfile[]; organisations: OrganizationModel[]; researchers: ResearcherModel[]; associatedUsers: UserModel[]; users: UserInfoListingModel[]; creator: UserModel; extraFields: Array; dynamicFields: Array; modified: Date; extraProperties: Map; language: String; } export interface DmpBlueprint { id: string; label: string; } export interface Dmp extends BaseEntity { label: string; version: number; status: DmpStatus; versionStatus: DmpVersionStatus; properties: string; groupId: String; description: String; finalizedAt: Date; publishedAt: Date; creator: User; accessType: DmpAccessType; blueprint: DmpBlueprint; language: String; publicAfter: Date; dmpReferences: DmpReference[]; dmpUsers: DmpUser[]; descriptions: Description[]; entityDois: EntityDoi[]; // TODO: delete // grant: GrantListingModel; // project: ProjectModel; // funder: FunderModel; // organisations: OrganizationModel[]; // researchers: ResearcherModel[]; // datasets: DatasetWizardModel[]; // datasetsToBeFinalized: string[]; // profiles: DmpDatasetProfile[]; // associatedUsers: UserModel[]; // users: UserInfoListingModel[]; // creator: UserModel; // extraFields: Array; // dynamicFields: Array; // extraProperties: Map; // language: String; } export interface DmpUser extends BaseEntity { dmp: Dmp; user: User; role: DmpUserRole; } export interface DmpDescriptionTemplate extends BaseEntity { dmp: Dmp; currentDescriptionTemplate: DescriptionTemplate; //TODO: what is this? descriptionTemplates: DescriptionTemplate[]; //TODO: why it is array? descriptionTemplateGroupId: Guid; sectionId: Guid; } // // Persist // export interface DmpPersist extends BaseEntityPersist { label: string; status: DmpStatus; properties: string; description: String; language: String; blueprint: DmpBlueprint; accessType: DmpAccessType; references: DmpReferencePersist[]; descriptionTemplates: DmpDescriptionTemplatePersist[]; } export interface DmpReferencePersist extends BaseEntityPersist { reference: ReferencePersist; data: string; } export interface DmpDescriptionTemplatePersist extends BaseEntityPersist { descriptionTemplateGroupId: Guid; sectionId: Guid; } export interface CloneDmpPersist { id: Guid; label: string; description: String; descriptions: Guid[]; } export interface NewVersionDmpPersist { id: Guid; label: string; description: String; blueprintId: Guid; descriptions: Guid[]; } export interface DmpUserPersist { user: Guid; role: DmpUserRole; }