inital
This commit is contained in:
293
OCPP.Core.Database/Migrations/20240405204318_TransactionsIndex.Designer.cs
generated
Normal file
293
OCPP.Core.Database/Migrations/20240405204318_TransactionsIndex.Designer.cs
generated
Normal file
@@ -0,0 +1,293 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using OCPP.Core.Database;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace OCPP.Core.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(OCPPCoreContext))]
|
||||
[Migration("20240405204318_TransactionsIndex")]
|
||||
partial class TransactionsIndex
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.ChargePoint", b =>
|
||||
{
|
||||
b.Property<string>("ChargePointId")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("ClientCertThumb")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("ChargePointId");
|
||||
|
||||
b.HasIndex(new[] { "ChargePointId" }, "ChargePoint_Identifier")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ChargePoint", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.ChargeTag", b =>
|
||||
{
|
||||
b.Property<string>("TagId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<bool?>("Blocked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("ExpiryDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("ParentTagId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("TagName")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.HasKey("TagId")
|
||||
.HasName("PK_ChargeKeys");
|
||||
|
||||
b.ToTable("ChargeTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.ConnectorStatus", b =>
|
||||
{
|
||||
b.Property<string>("ChargePointId")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<int>("ConnectorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConnectorName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<double?>("LastMeter")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime?>("LastMeterTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastStatus")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<DateTime?>("LastStatusTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("ChargePointId", "ConnectorId");
|
||||
|
||||
b.ToTable("ConnectorStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.ConnectorStatusView", b =>
|
||||
{
|
||||
b.Property<string>("ChargePointId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<int>("ConnectorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConnectorName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<double?>("LastMeter")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime?>("LastMeterTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("LastStatus")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<DateTime?>("LastStatusTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double?>("MeterStart")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double?>("MeterStop")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("StartResult")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("StartTagId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime?>("StartTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("StopReason")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("StopTagId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime?>("StopTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("TransactionId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.ToTable((string)null);
|
||||
|
||||
b.ToView("ConnectorStatusView", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.MessageLog", b =>
|
||||
{
|
||||
b.Property<int>("LogId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("LogId"));
|
||||
|
||||
b.Property<string>("ChargePointId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<int?>("ConnectorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ErrorCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<DateTime>("LogTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Result")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("LogId");
|
||||
|
||||
b.HasIndex(new[] { "LogTime" }, "IX_MessageLog_ChargePointId");
|
||||
|
||||
b.ToTable("MessageLog", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.Transaction", b =>
|
||||
{
|
||||
b.Property<int>("TransactionId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TransactionId"));
|
||||
|
||||
b.Property<string>("ChargePointId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<int>("ConnectorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("MeterStart")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double?>("MeterStop")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("StartResult")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("StartTagId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("StartTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("StopReason")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("StopTagId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime?>("StopTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Uid")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("TransactionId");
|
||||
|
||||
b.HasIndex("ChargePointId", "ConnectorId");
|
||||
|
||||
b.ToTable("Transactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.Transaction", b =>
|
||||
{
|
||||
b.HasOne("OCPP.Core.Database.ChargePoint", "ChargePoint")
|
||||
.WithMany("Transactions")
|
||||
.HasForeignKey("ChargePointId")
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_Transactions_ChargePoint");
|
||||
|
||||
b.Navigation("ChargePoint");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("OCPP.Core.Database.ChargePoint", b =>
|
||||
{
|
||||
b.Navigation("Transactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user