finalize config and mapping

This commit is contained in:
FrancescoMolinaro
2023-12-29 11:45:13 +01:00
parent e39e034329
commit fec6550cba
6 changed files with 114 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
import { AdminNotifyMessage } from "./admin-notify-message.model";
import { searchResultFor } from "../../../shared/search/search-result-element-decorator";
import { SearchResult } from "../../../shared/search/models/search-result.model";
@searchResultFor(AdminNotifyMessage)
export class AdminNotifySearchResult extends SearchResult<AdminNotifyMessage> {
}

View File

@@ -0,0 +1,31 @@
import { deserialize, inheritSerialization } from 'cerialize';
import { typedObject } from "../../../core/cache/builders/build-decorators";
import { ADMIN_NOTIFY_MESSAGE } from "./admin-notify-message.resource-type";
import { excludeFromEquals } from "../../../core/utilities/equals.decorators";
import { DSpaceObject } from "../../../core/shared/dspace-object.model";
/**
* A message that includes admin notify info
*/
@typedObject
@inheritSerialization(DSpaceObject)
export class AdminNotifyMessage extends DSpaceObject {
static type = ADMIN_NOTIFY_MESSAGE;
/**
* The type of the message
*/
@excludeFromEquals
type = ADMIN_NOTIFY_MESSAGE;
@deserialize
_links: {
self: {
href: string;
};
};
get self(): string {
return this._links.self.href;
}
}

View File

@@ -0,0 +1,9 @@
import { ResourceType } from "../../../core/shared/resource-type";
/**
* The resource type for AdminNotifyMessage
*
* Needs to be in a separate file to prevent circular
* dependencies in webpack.
*/
export const ADMIN_NOTIFY_MESSAGE = new ResourceType('message');