using System.ComponentModel.DataAnnotations; using Connected.Annotations; using Connected.Common.Documents; using Connected.ServiceModel; namespace Connected.Logistics.Documents.Receive; /// /// The arguments used when inserting a new item /// via service. /// public class InsertReceiveItemArgs : Dto { /// /// The id of the document. /// Must exists in the storage. /// [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 { [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 { 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!; }