mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-09-10 04:51:43 -04:00
Add Startup Events to Database
Now emit startup events on conneciton Some events still to add
This commit is contained in:
26
Pulsar/Context/Configuration/LoadoutConfiguration.cs
Normal file
26
Pulsar/Context/Configuration/LoadoutConfiguration.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Observatory.Framework.Files.Journal.Startup;
|
||||
|
||||
namespace Pulsar.Context.Configuration;
|
||||
|
||||
public class LoadoutConfiguration : IEntityTypeConfiguration<Loadout>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Loadout> builder)
|
||||
{
|
||||
builder.OwnsMany(l => l.Modules, lb =>
|
||||
{
|
||||
lb.OwnsOne(m => m.Engineering, mb =>
|
||||
{
|
||||
mb.OwnsMany(e => e.Modifiers, eb =>
|
||||
{
|
||||
eb.OwnsOne(em => em.Value, emb => emb.ToJson());
|
||||
eb.ToJson();
|
||||
});
|
||||
mb.ToJson();
|
||||
});
|
||||
lb.ToJson();
|
||||
});
|
||||
builder.OwnsOne(l => l.FuelCapacity, b=>b.ToJson());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user