namespace Elwig.Helpers.Weighing {
    /// <summary>
    /// Result of a weighing process on an industrial scale
    /// </summary>
    public class WeighingResult {
        /// <summary>
        /// Measured net weight in kg
        /// </summary>
        public int? Weight = null;

        /// <summary>
        /// Weighing id (or IdentNr) provided by the scale
        /// </summary>
        public string? WeighingId = null;

        /// <summary>
        /// Date string provided by the scale
        /// </summary>
        public string? Date = null;

        /// <summary>
        /// Time string provided by the scale
        /// </summary>
        public string? Time = null;

        /// <returns>&lt;Weight/WeighingId/Date/Time&gt;</returns>
        override public string ToString() {
            var w = Weight != null ? $"{Weight}kg" : "";
            return $"<{w}/{WeighingId}/{Date}/{Time}>";
        }
    }
}