|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Connected.Annotations;
|
|
|
|
|
using Connected.Common.Documents;
|
|
|
|
|
using Connected.ServiceModel;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Logistics.Documents.Receive;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The arguments used when inserting a new <see cref="IReceiveItem"/> item
|
|
|
|
|
/// via <see cref="IReceiveDocumentService"/> service.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class InsertReceiveItemArgs : Dto
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The id of the <see cref="IReceiveDocument"/> document.
|
|
|
|
|
/// Must exists in the storage.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Range(1, int.MaxValue)]
|
|
|
|
|
public int Document { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required, MaxLength(128)]
|
|
|
|
|
public string EntityType { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
[Required, MaxLength(128)]
|
|
|
|
|
public string EntityId { get; set; } = default!;
|
|
|
|
|
|
|
|
|
|
[Range(0, float.MaxValue)]
|
|
|
|
|
public float Quantity { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class UpdateReceiveItemArgs : PrimaryKeyArgs<long>
|
|
|
|
|
{
|
|
|
|
|
[MinValue(0)]
|
|
|
|
|
public float PostedQuantity { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class InsertReceiveDocumentArgs : InsertDocumentArgs
|
|
|
|
|
{
|
|
|
|
|
public int? Warehouse { get; set; }
|
|
|
|
|
|
|
|
|
|
public int? Supplier { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class UpdateReceiveDocumentArgs : UpdateDocumentArgs<int>
|
|
|
|
|
{
|
|
|
|
|
public int? Warehouse { get; set; }
|
|
|
|
|
|
|
|
|
|
public int? Supplier { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class SelectReceiveItemArgs : Dto
|
|
|
|
|
{
|
|
|
|
|
[MinValue(1)]
|
|
|
|
|
public int Document { get; set; }
|
|
|
|
|
[Required, MaxLength(128)]
|
|
|
|
|
public string Entity { get; set; } = default!;
|
|
|
|
|
[Required, MaxLength(128)]
|
|
|
|
|
public string EntityId { get; set; } = default!;
|
|
|
|
|
}
|