using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ObjectModel.Game
{
    /// <summary>
    /// 冠军
    /// </summary>
    public class DataFirstModel
    {
        /// <summary>
        /// 玩家Id
        /// </summary>
        public int UserId;

        /// <summary>
        /// 获得冠军时间
        /// </summary>
        public DateTime CreateTime;

        public DataFirstModel() { }

        public DataFirstModel(DataRow row) {
            this.UserId = (int)row["UserId"];
            this.CreateTime = (DateTime)row["CreateTime"];
        }

        

        /// <summary>
        /// 获取保存日赛冠军Sql
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        public static string GetInsertSql(int userid,int moduleId,int matchId) {
            return $"INSERT INTO[DataFirst]([UserId],  [moduleId], [matchId]) VALUES({userid}, {moduleId}, {matchId});";
            //return $"INSERT INTO [DataFirst]([UserId]) VALUES ({userid});";
        }
    }
}
