37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using Newtonsoft.Json;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Server.SQL
|
|
{
|
|
[Table("deck_info", Schema = "gamedb")]
|
|
public class DeckInfo
|
|
{
|
|
[Key]
|
|
public int id { get; set; }
|
|
[JsonIgnore]
|
|
public int user_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 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();
|
|
}
|
|
}
|
|
}
|