using MMoneyCoderSharp.Data.Request;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static MMoneyCoderSharp.DBDefine;

namespace MMoneyCoderSharp.DB
{
    /// <summary>
    /// </summary>
    internal class INDEX_FORGIEN_PAN : ADataObject
    {
     
        internal INDEX_FORGIEN_PAN(해외지수종류 recvDataType, string recvStockCode)
        {
            this.mDataType = recvDataType;
            this.mDataCode = recvStockCode;
        }

        해외지수종류 mDataType;

        string mDataCode = String.Empty;
        /// <summary>
        /// 금일 데이터 쿼리
        /// </summary>
        string queryBASIC = @"select a.f_input_name stock_name, round(b.f_last,2) curr_price, b.f_sign chg_type, round(b.f_diff,2)  net_chg, round(b.f_rate,2) rate 
		from t_world_ix_eq_master a, t_world_ix_eq_sise b 
	where a.f_symb = b.f_symb 
	and a.f_symb = '{0}'";

        public override IDataRequest buildData()
        {

            string bufQuery = "";

            bufQuery += String.Format(queryBASIC, mDataCode);

            mRequestQuery.Add("", bufQuery);

            return this;
        }
    }
}
