You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
4.0 KiB
85 lines
4.0 KiB
using System.Collections.Immutable;
|
|
using Common.Documents;
|
|
using Connected.Annotations;
|
|
using Connected.Notifications;
|
|
using Connected.ServiceModel;
|
|
|
|
namespace Logistics.Documents.Receive;
|
|
|
|
/// <summary>
|
|
/// Represents service for the <see cref="IReceivePostingDocument"/> document.
|
|
/// </summary>
|
|
[Service]
|
|
[ServiceUrl(DocumentUrls.Receives)]
|
|
public interface IReceivePostingDocumentService : IDocumentService<int, long>
|
|
{
|
|
event ServiceEventHandler<PrimaryKeyEventArgs<long>> PlannedItemUpdated;
|
|
/// <summary>
|
|
/// Inserts a new <see cref="IReceivePostingDocument"/>.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the properties of the new document.</param>
|
|
/// <returns>The id of the newly inserted document.</returns>
|
|
Task<int> Insert(InsertReceivePostingDocumentArgs args);
|
|
/// <summary>
|
|
/// Updates <see cref="IReceivePostingDocument"/> document.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing changed properties of the document.</param>
|
|
Task Update(UpdateReceivePostingDocumentArgs args);
|
|
/// <summary>
|
|
/// Performs partial update on the <see cref="IReceivePostingDocument"/> for the properties specified
|
|
/// in arguments.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing properties that need to be updated.</param>
|
|
Task Patch(PatchArgs<int> args);
|
|
/// <summary>
|
|
/// Deletes <see cref="IReceivePostingDocument"/> from the storage.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the id of the document that is about to be deleted.</param>
|
|
Task Delete(PrimaryKeyArgs<int> args);
|
|
/// <summary>
|
|
/// Selects <see cref="IReceivePostingDocument"/> for the specified id.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the id.</param>
|
|
/// <returns><see cref="IReceivePostingDocument"/> is found, <c>null</c> otherwise.</returns>
|
|
Task<IReceivePostingDocument?> Select(PrimaryKeyArgs<int> args);
|
|
/// <summary>
|
|
/// Queries <see cref="IReceivePostingDocument"/> for the specified <see cref="IReceiveDocument"/> document.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the id of the parent receive document.</param>
|
|
/// <returns><see cref="IReceivePostingDocument"/> if found, <c>null</c> otherwise.</returns>
|
|
Task<ImmutableList<IReceivePostingDocument>> Query(PrimaryKeyArgs<int> args);
|
|
/// <summary>
|
|
/// Inserts a new <see cref="IReceivePostingItem"/> into the <see cref="IReceivePostingDocument"/> document.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the properties of the new item.</param>
|
|
/// <returns>The id of the newly inserted <see cref="IReceivePostingItem"/> item.</returns>
|
|
Task<long> InsertItem(InsertReceivePostingItemArgs args);
|
|
|
|
Task PatchPlanedItem(PatchArgs<long> args);
|
|
|
|
/// <summary>
|
|
/// Queries the <see cref="IReceivePostingItem"/> items for the specified <see cref="IReceivePostingDocument"/>.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the id of the document for which the items to be
|
|
/// queried.</param>
|
|
/// <returns>The list of items that belong to the specified document.</returns>
|
|
Task<ImmutableList<IReceivePostingItem>> QueryItems(PrimaryKeyArgs<int> args);
|
|
/// <summary>
|
|
/// Selects the <see cref="IReceivePostingItem"/> item for the specified id.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the id of the item.</param>
|
|
/// <returns>The <see cref="IReceivePostingItem"/> if found, <c>null</c> otherwise.</returns>
|
|
Task<IReceivePostingItem?> SelectItem(PrimaryKeyArgs<long> args);
|
|
|
|
/// <summary>
|
|
/// Updates <see cref="IReceivePlannedItem"/>.
|
|
/// </summary>
|
|
/// <param name="args">The arguments containing the changed properties of the item.</param>
|
|
Task UpdatePlannedItem(UpdateReceivePlannedItemArgs args);
|
|
|
|
Task<IReceivePlannedItem?> SelectPlannedItem(PrimaryKeyArgs<long> args);
|
|
Task<IReceivePlannedItem?> SelectPlannedItem(SelectReceivePlannedItemArgs args);
|
|
Task<ImmutableList<IReceivePlannedItem>> QueryPlannedItems(PrimaryKeyArgs<int> args);
|
|
Task<ImmutableList<IReceivePlannedItem>> QueryPlannedItems(PrimaryKeyArgs<long> args);
|
|
}
|