using System;
using System.Text;
using MarketData.Utils;

namespace MarketData.MarketDataModel
{
  public class AnalystPriceTarget
  {
    private DateTime date;
    private String symbol;
    private double meanTargetPrice;
    private double medianTargetPrice;
    private double highTargetPrice;
    private double lowTargetPrice;

    public AnalystPriceTarget()
    {
    }
    public DateTime Date
    {
      get { return date; }
      set { date = value; }
    }
    public String Symbol
    {
      get { return symbol; }
      set { symbol = value; }
    }
    public double MeanTargetPrice
    {
      get { return meanTargetPrice; }
      set { meanTargetPrice = value; }
    }
    public double MedianTargetPrice
    {
      get { return medianTargetPrice; }
      set { medianTargetPrice = value; }
    }
    public double HighTargetPrice
    {
      get { return highTargetPrice; }
      set { highTargetPrice = value; }
    }
    public double LowTargetPrice
    {
      get { return lowTargetPrice; }
      set { lowTargetPrice = value; }
    }
    public static String Header
    {
      get
      {
        StringBuilder sb = new StringBuilder();
        sb.Append("Date").Append(",");
        sb.Append("Symbol").Append(",");
        sb.Append("MeanTargetPrice").Append(",");
        sb.Append("MedianTargetPrice").Append(",");
        sb.Append("HighTargetPrice").Append(",");
        sb.Append("LowTargetPrice");
        return sb.ToString();
      }
    }
    public override String ToString()
    {
      StringBuilder sb = new StringBuilder();
      sb.Append(Symbol).Append(",");
      sb.Append(Utility.DateTimeToStringMMSDDSYYYY(Date)).Append(",");
      sb.Append(symbol).Append(",");
      sb.Append(String.Format("{0:0.00}", MeanTargetPrice)).Append(",");
      sb.Append(String.Format("{0:0.00}", MedianTargetPrice)).Append(",");
      sb.Append(String.Format("{0:0.00}", HighTargetPrice)).Append(",");
      sb.Append(String.Format("{0:0.00}", LowTargetPrice));
      return sb.ToString();
    }
  }
}