thewar_server/Server/SQL/StoryProgress.cs

32 lines
828 B
C#

using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
namespace Server.SQL
{
[Table("story_progress", Schema = "gamedb")]
public class StoryProgress
{
public int id { get; set; }
[JsonIgnore]
public int user_id { get; set; }
public int story_data_id { get; set; }
public int chapter_data_id { get; set; }
}
public class StoryProgressSQL : SQL<StoryProgress>
{
public override DbSet<StoryProgress> table { get; set; }
public void Update(StoryProgress etcItem)
{
table.Update(etcItem);
}
public override List<StoryProgress> SelectUid(int user_id)
{
return table.Where(data => data.user_id == user_id).ToList();
}
}
}