mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +00:00
[CST-4878] Finished working on embargo add part of form and unit testing
This commit is contained in:
37
src/app/core/submission/models/submission-accesses.model.ts
Normal file
37
src/app/core/submission/models/submission-accesses.model.ts
Normal 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user