Add metering device entity
This commit is contained in:
@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
{
|
||||
[DbContext(typeof(HcsDbContext))]
|
||||
@ -162,6 +163,33 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
b.ToTable("Houses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.MeteringDevice", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<Guid?>("HcsId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int?>("LastSyncOperationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("SyncedAt")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ThirdPartyId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LastSyncOperationId");
|
||||
|
||||
b.ToTable("MeteringDevices");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Operation", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -312,6 +340,15 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
b.Navigation("LastSyncOperation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.MeteringDevice", b =>
|
||||
{
|
||||
b.HasOne("Hcs.WebApp.Data.Hcs.Operation", "LastSyncOperation")
|
||||
.WithMany("MeteringDevices")
|
||||
.HasForeignKey("LastSyncOperationId");
|
||||
|
||||
b.Navigation("LastSyncOperation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hcs.WebApp.Data.Hcs.Operation", b =>
|
||||
{
|
||||
b.HasOne("Hcs.WebApp.Data.Hcs.Campaign", "Campaign")
|
||||
@ -365,6 +402,8 @@ namespace Hcs.WebApp.Data.Hcs.Migrations
|
||||
|
||||
b.Navigation("Houses");
|
||||
|
||||
b.Navigation("MeteringDevices");
|
||||
|
||||
b.Navigation("Registries");
|
||||
|
||||
b.Navigation("SupplyContracts");
|
||||
|
||||
Reference in New Issue
Block a user