using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using System.ComponentModel.DataAnnotations.Schema; namespace Server.SQL { [Table("shop_item", Schema = "gamedb")] public class ShopItem { public int id { get; set; } [JsonIgnore] public int user_id { get; set; } public int shop_item_data_id { get; set; } public DateTime buy_date { get; set; } } public class ShopItemSQL : SQL { public override DbSet table { get; set; } public void Update(ShopItem ShopItem) { table.Update(ShopItem); } public override List SelectUid(int user_id) { return table.Where(data => data.user_id == user_id).ToList(); } public List SelectUid(int user_id, int shop_item_data_id) { return table.Where(data => data.user_id == user_id && data.shop_item_data_id == shop_item_data_id).ToList(); } } }