FunGame-Core/Library/SQLScript/Common/ServerLoginLogs.cs
milimoe 2827c53d14
补全数据库表、查询常量类 (#118)
* 补充数据库表

* 更新sqlite

* 添加商店相关的数据库常量类

* add Update_UpdateRoomMaster

* 修改常量类

* 添加  NOTICE 文件

* 添加市场、报价、库存的数据库常量类

* 优化表结构和查询常量类

* 添加 UserCenter 和 Inventory 相关枚举;数据表和 Query 常量类修改

* 添加报价的核心操作

* 涉及库存的物品获取应该使用 Guid 而不是 ItemId

---------

Co-authored-by: yeziuku <yezi@wrss.org>
2025-04-04 23:39:49 +08:00

27 lines
1.1 KiB
C#

using Milimoe.FunGame.Core.Api.Transmittal;
namespace Milimoe.FunGame.Core.Library.SQLScript.Common
{
public class ServerLoginLogs : Constant
{
public const string TableName = "ServerLoginLogs";
public const string Column_ServerName = "ServerName";
public const string Column_ServerKey = "ServerKey";
public const string Column_LoginTime = "LoginTime";
public const string Column_LastTime = "LastTime";
public static string Insert_ServerLoginLog(SQLHelper SQLHelper, string ServerName, string ServerKey)
{
SQLHelper.Parameters["@ServerName"] = ServerName;
SQLHelper.Parameters["@ServerKey"] = ServerKey;
SQLHelper.Parameters["@LoginTime"] = DateTime.Now;
return $"{Command_Insert} {Command_Into} {TableName} ({Column_ServerName}, {Column_ServerKey}, {Column_LoginTime}) {Command_Values} (@ServerName, @ServerKey, @LoginTime)";
}
public static string Select_GetLastLoginTime()
{
return $"{Command_Select} Max({Column_LoginTime}) {Column_LastTime} {Command_From} {TableName}";
}
}
}