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.
Connected.Logistics/Connected.Logistics.Documen.../Receive/ReceiveDocumentArgs.cs

58 lines
1.5 KiB

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!;
}