using Connected.Data; namespace Logistics.Types.Serials; /// /// Represents a serial number in the logistic environment. /// /// /// The primary usage of the Serial is in warehouse management /// system, where every item in the stock is labeled with serial number. /// Once the item is received and before it is put in the stock locations, /// it receives a unique serial number. If the item is moved between stock /// locations and even warehouses, its serial value remains the same. Serial /// number plays a key role in traceability. /// public interface ISerial : IPrimaryKey { /// /// The entity which owns the serial number. This could /// be Product, Semi product, Raw or any other type of /// entity which needs some kind of labeling. /// string Entity { get; init; } /// /// The primary key of the entity. This points to the exact record of /// the Entity type. /// string EntityId { get; init; } /// /// The actual Serial number. System can use different middleware techniques /// to obtain this value because it's very common to be have project specific /// implementation to calculate this value. /// string Value { get; init; } /// /// The remaining quantity in the stock for this serial. This value can increase /// or decrease depending on the warehouse implementation. Some systems do reuse /// the same serial between different receives. /// float Quantity { get; init; } /// /// The date serial was created. /// DateTimeOffset Created { get; init; } /// /// If the item has limited shelf life, this value should hold the date when /// the shelf life expires. /// DateTimeOffset? BestBefore { get; init; } /// /// The status of the serial number. If the status is the /// processes using the serial number should not allow the entity to be used in documents. /// Status Status { get; init; } }