Thinking about shunting most of the file parsing into db services since it should be done once
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using fxl.codes.kisekae.Entities;
|
||||
|
||||
namespace fxl.codes.kisekae.Models
|
||||
{
|
||||
public class ConfigurationModel
|
||||
{
|
||||
public ConfigurationModel(KisekaeDto dto)
|
||||
{
|
||||
Id = dto.Id;
|
||||
Name = dto.Name;
|
||||
|
||||
Configurations = new Dictionary<int, string>();
|
||||
foreach (var config in dto.Configurations) Configurations.Add(config.Id, config.Filename);
|
||||
}
|
||||
|
||||
public int Id { get; }
|
||||
public string Name { get; }
|
||||
public IDictionary<int, string> Configurations { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Models
|
||||
{
|
||||
public class DirectoryModel
|
||||
{
|
||||
public string Name { get; }
|
||||
|
||||
public DirectoryModel(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public List<ConfigurationModel> Configurations { get; } = new();
|
||||
}
|
||||
|
||||
public class ConfigurationModel
|
||||
{
|
||||
public string Name { get; }
|
||||
|
||||
public ConfigurationModel(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ namespace fxl.codes.kisekae.Models
|
||||
public string Name { get; set; }
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
[JsonIgnore] public int BorderColorIndex { get; set; }
|
||||
[JsonIgnore] public Color BorderColor { get; set; } = Color.Black;
|
||||
[JsonIgnore] public List<PaletteModel> Palettes { get; } = new();
|
||||
public List<CelModel> Cels { get; } = new();
|
||||
|
||||
Reference in New Issue
Block a user