using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankTV.Helpers;

namespace BankTV.Model.Currency
{
    public class CurrencyItem : AbstractModel
    {
        public string Abbr { get; set; }
        public string ImageName { get; set; }
        public decimal SellingPrice { get; set; }
        public decimal BuyingPrice { get; set; }
        public CurrencyPriceDirection BuyingPriceDirection;
        public CurrencyPriceDirection SellingPriceDirection;

        public string GetFilePath()
        {
            if (String.IsNullOrEmpty(this.ImageName))
            {
                return String.Empty;
            }   //if
            string currencyDir = GlobalHelper.GetCurrencyFolder();
            if (String.IsNullOrEmpty(currencyDir))
            {
                return String.Empty;
            }   //if
            return Path.Combine(currencyDir, this.ImageName);
        }

        public enum CurrencyPriceDirection
        {
            UP,
            DOWN,
            NOCHANGE
        };

    }
}
