mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
remove normalized models part 1
This commit is contained in:
@@ -1,30 +1,44 @@
|
||||
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
|
||||
import { Observable } from 'rxjs';
|
||||
import { link, resourceType } from '../../cache/builders/build-decorators';
|
||||
import { PaginatedList } from '../../data/paginated-list';
|
||||
import { RemoteData } from '../../data/remote-data';
|
||||
|
||||
import { DSpaceObject } from '../../shared/dspace-object.model';
|
||||
import { HALLink } from '../../shared/hal-link.model';
|
||||
import { GROUP } from './group.resource-type';
|
||||
|
||||
@resourceType(Group.type)
|
||||
@inheritSerialization(DSpaceObject)
|
||||
export class Group extends DSpaceObject {
|
||||
static type = GROUP;
|
||||
|
||||
/**
|
||||
* List of Groups that this Group belong to
|
||||
*/
|
||||
public groups: Observable<RemoteData<PaginatedList<Group>>>;
|
||||
|
||||
/**
|
||||
* A string representing the unique handle of this Group
|
||||
*/
|
||||
@autoserialize
|
||||
public handle: string;
|
||||
|
||||
/**
|
||||
* A string representing the name of this Group
|
||||
* A boolean denoting whether this Group is permanent
|
||||
*/
|
||||
public name: string;
|
||||
@autoserialize
|
||||
public permanent: boolean;
|
||||
|
||||
/**
|
||||
* A string representing the name of this Group is permanent
|
||||
* The HALLinks for this Group
|
||||
*/
|
||||
public permanent: boolean;
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
groups: HALLink;
|
||||
};
|
||||
|
||||
/**
|
||||
* The list of Groups this Group is part of
|
||||
* Will be undefined unless the groups HALLink has been resolved.
|
||||
*/
|
||||
@link(GROUP, true)
|
||||
public groups?: Observable<RemoteData<PaginatedList<Group>>>;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user