[CST-4878] Finished working on embargo add part of form and unit testing

This commit is contained in:
Rezart Vata
2021-12-21 13:35:29 +01:00
parent 31fd89a9fc
commit f04f4b4f34
30 changed files with 1219 additions and 101 deletions

View File

@@ -0,0 +1,37 @@
import { autoserialize, inheritSerialization } from 'cerialize';
import { typedObject } from '../../cache/builders/build-decorators';
import { excludeFromEquals } from '../../utilities/equals.decorators';
import { ResourceType } from '../../shared/resource-type';
import { HALResource } from '../../shared/hal-resource.model';
import { SUBMISSION_ACCESSES } from 'src/app/core/submission/models/submission-accesses.resource-type';
@typedObject
@inheritSerialization(HALResource)
export class SubmissionAccesses extends HALResource {
static type = SUBMISSION_ACCESSES;
/**
* The object type
*/
@excludeFromEquals
@autoserialize
type: ResourceType;
@autoserialize
discoverable: boolean;
@autoserialize
accessConditions: AccessConditions[];
}
export interface AccessConditions {
name: string;
startDate?: Date;
hasStartDate?: boolean;
maxStartDate?: string;
hasEndDate?: boolean;
maxEndDate?: string;
endDate?: Date;
}