mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-23 04:29:36 +08:00

* 补充数据库表 * 更新sqlite * 添加商店相关的数据库常量类 * add Update_UpdateRoomMaster * 修改常量类 * 添加 NOTICE 文件 * 添加市场、报价、库存的数据库常量类 * 优化表结构和查询常量类 * 添加 UserCenter 和 Inventory 相关枚举;数据表和 Query 常量类修改 * 添加报价的核心操作 * 涉及库存的物品获取应该使用 Guid 而不是 ItemId --------- Co-authored-by: yeziuku <yezi@wrss.org>
40 lines
1.6 KiB
C#
40 lines
1.6 KiB
C#
using Milimoe.FunGame.Core.Api.Transmittal;
|
|
|
|
namespace Milimoe.FunGame.Core.Library.SQLScript.Entity
|
|
{
|
|
public class GoodsItemsQuery : Constant
|
|
{
|
|
public const string TableName = "GoodsItems";
|
|
public const string Column_Id = "Id";
|
|
public const string Column_GoodsId = "GoodsId";
|
|
public const string Column_ItemId = "ItemId";
|
|
|
|
public const string Select_GoodsItems = $"{Command_Select} {Command_All} {Command_From} {TableName}";
|
|
|
|
public static string Select_GoodsItemsByGoodsId(SQLHelper SQLHelper, long GoodsId)
|
|
{
|
|
SQLHelper.Parameters["@GoodsId"] = GoodsId;
|
|
return $"{Select_GoodsItems} {Command_Where} {Column_GoodsId} = @GoodsId";
|
|
}
|
|
|
|
public static string Insert_GoodsItem(SQLHelper SQLHelper, long GoodsId, long ItemId)
|
|
{
|
|
SQLHelper.Parameters["@GoodsId"] = GoodsId;
|
|
SQLHelper.Parameters["@ItemId"] = ItemId;
|
|
return $"{Command_Insert} {Command_Into} {TableName} ({Column_GoodsId}, {Column_ItemId}) {Command_Values} (@GoodsId, @ItemId)";
|
|
}
|
|
|
|
public static string Delete_GoodsItem(SQLHelper SQLHelper, long Id)
|
|
{
|
|
SQLHelper.Parameters["@Id"] = Id;
|
|
return $"{Command_Delete} {Command_From} {TableName} {Command_Where} {Column_Id} = @Id";
|
|
}
|
|
|
|
public static string Delete_GoodsItemByGoodsId(SQLHelper SQLHelper, long GoodsId)
|
|
{
|
|
SQLHelper.Parameters["@GoodsId"] = GoodsId;
|
|
return $"{Command_Delete} {Command_From} {TableName} {Command_Where} {Column_GoodsId} = @GoodsId";
|
|
}
|
|
}
|
|
}
|