thewar_server/Server/SQL/DeckInfo.cs

35 lines
1.1 KiB
C#

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