thewar_server/Server/SQL/DeckInfo.cs

35 lines
1.0 KiB
C#

using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
namespace Server.SQL
{
[Table("deck_info", Schema = "gamedb")]
public class DeckInfo
{
public long id { get; set; }
public int deck_type { get; set; }
public long deck_unit0_id { get; set; }
public long deck_unit1_id { get; set; }
public long deck_unit2_id { get; set; }
public long deck_unit3_id { get; set; }
public long deck_unit4_id { get; set; }
public long deck_unit5_id { get; set; }
public long deck_unit6_id { get; set; }
public long deck_unit7_id { get; set; }
public long deck_unit8_id { get; set; }
[JsonIgnore]
public long user_id { get; set; }
}
public class DeckInfoSQL : SQL<DeckInfo>
{
public override DbSet<DeckInfo> table { get; set; }
public override List<DeckInfo> SelectUid(long user_id)
{
return table.Where(data => data.user_id == user_id).ToList();
}
}
}