namespace StorageSystem.Stock
{
    public readonly struct StockUpdateResult
    {
        public readonly bool IsSuccess;
        public readonly string Reason;

        private StockUpdateResult(bool isSuccess, string reason = null)
        {
            IsSuccess = isSuccess;
            Reason = reason;
        }

        internal static StockUpdateResult Success()
        {
            return new StockUpdateResult(true);
        }

        internal static StockUpdateResult Failure(string reason)
        {
            return new StockUpdateResult(false, reason);

        }
    }
}