36 lines
974 B
C#
36 lines
974 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Server.System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Server.SQL
|
|
{
|
|
[Table("equipmentdata", Schema = "excel")]
|
|
public class EquipmentData
|
|
{
|
|
[Key]
|
|
public long index { get; set; }
|
|
public int part { get; set; }
|
|
}
|
|
|
|
public class EquipmentDataSQL : SQL<EquipmentData>
|
|
{
|
|
public override DbSet<EquipmentData> table { get; set; }
|
|
|
|
public override List<EquipmentData> SelectUid(long user_id)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public void init()
|
|
{
|
|
Statics.equipmentData = new Dictionary<long, EquipmentData>();
|
|
List<EquipmentData> equipmentDatas = table.ToList();
|
|
for(int n = 0; n < equipmentDatas.Count; n++)
|
|
{
|
|
Statics.equipmentData.Add(equipmentDatas[n].index, equipmentDatas[n]);
|
|
}
|
|
}
|
|
}
|
|
}
|