mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-09-10 04:51:43 -04:00
Fix issues with Journal handling
Implement basic database Handle startup events only send events after the most recent LoadGame
This commit is contained in:
25
Pulsar/Context/Configuration/MaterialsConfiguration.cs
Normal file
25
Pulsar/Context/Configuration/MaterialsConfiguration.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace Pulsar.Context.Configuration;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Observatory.Framework.Files.Journal.Startup;
|
||||
|
||||
public class MaterialsConfiguration : IEntityTypeConfiguration<Materials>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Materials> builder)
|
||||
{
|
||||
builder.HasKey(x => x.Timestamp);
|
||||
builder.OwnsMany(x => x.Raw, b =>
|
||||
{
|
||||
b.ToJson();
|
||||
});
|
||||
builder.OwnsMany(x => x.Encoded, b =>
|
||||
{
|
||||
b.ToJson();
|
||||
});
|
||||
builder.OwnsMany(x => x.Manufactured, b =>
|
||||
{
|
||||
b.ToJson();
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user