Converting to EF, need to work on TS
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class Action
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class Cel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public byte[] Data { get; set; }
|
||||
public int OffsetX { get; set; }
|
||||
public int OffsetY { get; set; }
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
public Kisekae Kisekae { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class CelConfig
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Cel Cel { get; set; }
|
||||
public Configuration Configuration { get; set; }
|
||||
public int Mark { get; set; }
|
||||
public int Fix { get; set; }
|
||||
public Palette Palette { get; set; }
|
||||
public int PaletteGroup { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
public int Transparency { get; set; }
|
||||
public Set Sets { get; set; }
|
||||
public Render Render { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("cel_config")]
|
||||
public class CelConfigDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Column("cel_id")] public int CelId { get; set; }
|
||||
[Column("config_id")] public int ConfigId { get; set; }
|
||||
public int Mark { get; set; }
|
||||
public int Fix { get; set; }
|
||||
public Set Sets { get; set; } = Set.Unset;
|
||||
public int Transparency { get; set; }
|
||||
public string Comment { get; set; }
|
||||
[Column("palette_id")] public int PaletteId { get; set; }
|
||||
[IgnoreDataMember] public int PaletteIndex { get; set; }
|
||||
[Column("palette_group")] public int PaletteGroup { get; set; }
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("cel")]
|
||||
public class CelDto : IKisekaeFile, IKisekaeParseable
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Column("kisekae_id")] public int KisekaeId { get; set; }
|
||||
public string Filename { get; set; }
|
||||
public byte[] Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("cel_render")]
|
||||
public class CelRenderDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Column("cel_id")] public int CelId { get; set; }
|
||||
[Column("palette_id")] public int PaletteId { get; set; }
|
||||
public byte[] Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class Configuration
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public Kisekae Kisekae { get; set; }
|
||||
public List<CelConfig> Cels { get; set; } = new();
|
||||
public List<Action> Actions { get; set; } = new();
|
||||
|
||||
public string Data { get; set; }
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int BorderIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("configuration")]
|
||||
public class ConfigurationDto : IKisekaeFile
|
||||
{
|
||||
public string Data { get; set; }
|
||||
public int? Height { get; set; }
|
||||
public int? Width { get; set; }
|
||||
[Column("border_index")] public int? BorderIndex { get; set; }
|
||||
public List<CelConfigDto> Cels { get; set; } = new();
|
||||
public List<PaletteDto> Palettes { get; set; } = new();
|
||||
public int Id { get; set; }
|
||||
[Column("kisekae_id")] public int KisekaeId { get; set; }
|
||||
public string Filename { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public interface IKisekaeFile
|
||||
{
|
||||
int Id { get; set; }
|
||||
int KisekaeId { get; set; }
|
||||
string Filename { get; set; }
|
||||
}
|
||||
|
||||
public interface IKisekaeParseable
|
||||
{
|
||||
byte[] Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class Kisekae
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string CheckSum { get; set; }
|
||||
public List<Configuration> Configurations { get; set; } = new();
|
||||
public List<Cel> Cels { get; set; } = new();
|
||||
public List<Palette> Palettes { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("kisekae")]
|
||||
public class KisekaeDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; init; }
|
||||
public string Filename { get; init; }
|
||||
public string Checksum { get; set; }
|
||||
public IEnumerable<ConfigurationDto> Configurations { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class Palette
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Kisekae Kisekae { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public List<PaletteColor> Colors { get; set; } = new();
|
||||
public byte[] Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class PaletteColor
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Palette Palette { get; set; }
|
||||
public int Group { get; set; }
|
||||
public string Hex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("palette_color")]
|
||||
public class PaletteColorDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Column("palette_id")] public int PaletteId { get; set; }
|
||||
public int Group { get; set; }
|
||||
public string Hex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
[Table("palette")]
|
||||
public class PaletteDto : IKisekaeFile, IKisekaeParseable
|
||||
{
|
||||
public string Comment { get; set; }
|
||||
public int Id { get; set; }
|
||||
[Column("kisekae_id")] public int KisekaeId { get; set; }
|
||||
public string Filename { get; set; }
|
||||
public byte[] Data { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace fxl.codes.kisekae.Entities
|
||||
{
|
||||
public class Render
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public byte[] Image { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user