mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
Added Eperson and group models
This commit is contained in:
37
src/app/core/eperson/models/NormalizedEperson.model.ts
Normal file
37
src/app/core/eperson/models/NormalizedEperson.model.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||||
|
import { CacheableObject } from '../../cache/object-cache.reducer';
|
||||||
|
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
|
||||||
|
import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model';
|
||||||
|
import { Eperson } from './eperson.model';
|
||||||
|
import { mapsTo, relationship } from '../../cache/builders/build-decorators';
|
||||||
|
import { ResourceType } from '../../shared/resource-type';
|
||||||
|
|
||||||
|
@mapsTo(Eperson)
|
||||||
|
@inheritSerialization(NormalizedDSpaceObject)
|
||||||
|
export class NormalizedEpersonModel extends NormalizedDSpaceObject implements CacheableObject, ListableObject {
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public handle: string;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
@relationship(ResourceType.Group, true)
|
||||||
|
groups: string[];
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public netid: string;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public lastActive: string;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public canLogIn: boolean;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public email: string;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public requireCertificate: boolean;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public selfRegistered: boolean;
|
||||||
|
}
|
18
src/app/core/eperson/models/NormalizedGroup.model.ts
Normal file
18
src/app/core/eperson/models/NormalizedGroup.model.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { autoserialize, inheritSerialization } from 'cerialize';
|
||||||
|
import { CacheableObject } from '../../cache/object-cache.reducer';
|
||||||
|
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
|
||||||
|
import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model';
|
||||||
|
import { Eperson } from './eperson.model';
|
||||||
|
import { mapsTo } from '../../cache/builders/build-decorators';
|
||||||
|
import { Group } from './group.model';
|
||||||
|
|
||||||
|
@mapsTo(Group)
|
||||||
|
@inheritSerialization(NormalizedDSpaceObject)
|
||||||
|
export class NormalizedGroupModel extends NormalizedDSpaceObject implements CacheableObject, ListableObject {
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public handle: string;
|
||||||
|
|
||||||
|
@autoserialize
|
||||||
|
public permanent: boolean;
|
||||||
|
}
|
22
src/app/core/eperson/models/eperson.model.ts
Normal file
22
src/app/core/eperson/models/eperson.model.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||||
|
import { Group } from './group.model';
|
||||||
|
|
||||||
|
export class Eperson extends DSpaceObject {
|
||||||
|
|
||||||
|
public handle: string;
|
||||||
|
|
||||||
|
public groups: Group[];
|
||||||
|
|
||||||
|
public netid: string;
|
||||||
|
|
||||||
|
public lastActive: string;
|
||||||
|
|
||||||
|
public canLogIn: boolean;
|
||||||
|
|
||||||
|
public email: string;
|
||||||
|
|
||||||
|
public requireCertificate: boolean;
|
||||||
|
|
||||||
|
public selfRegistered: boolean;
|
||||||
|
|
||||||
|
}
|
8
src/app/core/eperson/models/group.model.ts
Normal file
8
src/app/core/eperson/models/group.model.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||||
|
|
||||||
|
export class Group extends DSpaceObject {
|
||||||
|
|
||||||
|
public handle: string;
|
||||||
|
|
||||||
|
public permanent: boolean;
|
||||||
|
}
|
@@ -9,4 +9,6 @@ export enum ResourceType {
|
|||||||
Item = 'item',
|
Item = 'item',
|
||||||
Collection = 'collection',
|
Collection = 'collection',
|
||||||
Community = 'community',
|
Community = 'community',
|
||||||
|
Eperson = 'eperson',
|
||||||
|
Group = 'group',
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user