33 lines
888 B
C#
33 lines
888 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Newtonsoft.Json;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Server.SQL
|
|
{
|
|
[Table("shop_item", Schema = "gamedb")]
|
|
public class ShopItem
|
|
{
|
|
[JsonIgnore]
|
|
public long user_id { get; set; }
|
|
public long id { get; set; }
|
|
public long shop_item_data_id { get; set; }
|
|
public DateTime end_date { get; set; }
|
|
}
|
|
|
|
public class ShopItemSQL : SQL<ShopItem>
|
|
{
|
|
public override DbSet<ShopItem> table { get; set; }
|
|
|
|
public void Update(ShopItem ShopItem)
|
|
{
|
|
table.Update(ShopItem);
|
|
}
|
|
|
|
public override List<ShopItem> SelectUid(long user_id)
|
|
{
|
|
//현재 시간도 비교해서 이전날자가 들어가지 않게 하기
|
|
return table.Where(data => data.user_id == user_id).ToList();
|
|
}
|
|
}
|
|
}
|