//
using System;
using EVCB_OCPP.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace EVCB_OCPP.Domain.Migrations
{
[DbContext(typeof(MainDBContext))]
[Migration("20231019090745_Updatetest")]
partial class Updatetest
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("Chinese_Taiwan_Stroke_CI_AS")
.HasAnnotation("ProductVersion", "7.0.12")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.ConnectorMeterValueRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConnectorId")
.HasColumnType("tinyint");
b.Property("ContextId")
.HasColumnType("int");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("FormatId")
.HasColumnType("int");
b.Property("LocationId")
.HasColumnType("int");
b.Property("MeasurandId")
.HasColumnType("int");
b.Property("PhaseId")
.HasColumnType("int");
b.Property("TransactionId")
.HasColumnType("int");
b.Property("UnitId")
.HasColumnType("int");
b.Property("Value")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.HasKey("Id")
.HasName("PK_dbo.ConnectorMeterValueRecord");
b.ToTable("ConnectorMeterValueRecord", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.ConnectorStatus", b =>
{
b.Property("Id")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ChargePointErrorCodeId")
.HasColumnType("int");
b.Property("ConnectorId")
.HasColumnType("tinyint");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("ErrorInfo")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("Status")
.HasColumnType("int");
b.Property("TotalEnergy")
.HasColumnType("decimal(10, 2)");
b.Property("Type")
.HasColumnType("int");
b.Property("VendorErrorCode")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("VendorId")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.HasKey("Id")
.HasName("PK_dbo.ConnectorStatus");
b.HasIndex(new[] { "ChargeBoxId", "ConnectorId" }, "IX_ConnectorStatus")
.IsUnique()
.HasFilter("[ChargeBoxId] IS NOT NULL");
b.ToTable("ConnectorStatus", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.Customer", b =>
{
b.Property("Id")
.HasColumnType("uniqueidentifier");
b.Property("ApiCustomerId")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("ApiKey")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("ApiKeyUpdatedOn")
.HasColumnType("datetime");
b.Property("ApiUrl")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("CallPartnerApiOnSchedule")
.HasColumnType("bit");
b.Property("CreatedBy")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("Deadline")
.HasColumnType("datetime");
b.Property("EnableTtia")
.HasColumnType("bit")
.HasColumnName("EnableTTIA");
b.Property("Ftphost")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("FTPHost");
b.Property("Ftppassword")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasColumnName("FTPPassword");
b.Property("Ftppath")
.HasColumnType("nvarchar(max)")
.HasColumnName("FTPPath");
b.Property("Ftpuser")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasColumnName("FTPUser");
b.Property("InstantStopTxReport")
.HasColumnType("bit");
b.Property("IsShow")
.HasColumnType("bit");
b.Property("Name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("PartnerId")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("TtiaApikey")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasColumnName("TTIA_APIKey");
b.Property("TtiaApiurl")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)")
.HasColumnName("TTIA_APIUrl");
b.Property("TtiaCustomerId")
.HasColumnType("int")
.HasColumnName("TTIA_CustomerId");
b.Property("TtiaEquipmentProvider")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)")
.HasColumnName("TTIA_EquipmentProvider");
b.Property("UpdatedBy")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("UpdatedOn")
.HasColumnType("datetime");
b.HasKey("Id")
.HasName("PK_dbo.Customer");
b.ToTable("Customer", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.LoadingBalance", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("FinishedOn")
.HasColumnType("datetime");
b.Property("MachineId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("Power")
.HasColumnType("decimal(10, 2)");
b.Property("StationId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("LoadingBalance", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.Machine", b =>
{
b.Property("Id")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("BoardVersions")
.HasColumnType("nvarchar(max)");
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ChargeBoxSerialNumber")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b.Property("ChargePointModel")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("ChargePointSerialNumber")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b.Property("ChargePointVendor")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("Comment")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("ConnectionType")
.HasColumnType("int");
b.Property("ConnectorPowerType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConnectorType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedBy")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("CustomerId")
.HasColumnType("uniqueidentifier");
b.Property("FwAssignedVersion")
.HasColumnType("int")
.HasColumnName("FW_AssignedVersion");
b.Property("FwCurrentVersion")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("FW_CurrentVersion");
b.Property("FwVersionReport")
.HasColumnType("int")
.HasColumnName("FW_VersionReport");
b.Property("GunAmt")
.HasColumnType("int");
b.Property("HeartbeatUpdatedOn")
.HasColumnType("datetime");
b.Property("Iccid")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("Imsi")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("IsDelete")
.HasColumnType("bit");
b.Property("Latitude")
.HasColumnType("decimal(10, 6)");
b.Property("Longitude")
.HasColumnType("decimal(10, 6)");
b.Property("MeterSerialNumber")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b.Property("MeterType")
.HasMaxLength(25)
.HasColumnType("nvarchar(25)");
b.Property("ModelName")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasDefaultValueSql("('')");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("OfflineOn")
.HasColumnType("datetime");
b.Property("Online")
.HasColumnType("bit");
b.Property("RatedPower")
.HasColumnType("decimal(6, 2)");
b.Property("Ttiatag")
.HasColumnType("int")
.HasColumnName("TTIATag");
b.Property("VendorId")
.ValueGeneratedOnAdd()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasDefaultValueSql("('Zerova')");
b.HasKey("Id")
.HasName("PK_dbo.Machine");
b.HasIndex(new[] { "CustomerId", "ChargeBoxId" }, "nci_wi_Machine_7CD4A9D1688F96F6967B2244A0666F62");
b.ToTable("Machine", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.MachineConfiguration", b =>
{
b.Property("ConfigureName")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConfigureSetting")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property("Exists")
.HasColumnType("bit");
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ReadOnly")
.HasColumnType("bit");
b.HasKey("ConfigureName", "ChargeBoxId")
.HasName("PK_dbo.MachineConfigurations");
b.HasIndex(new[] { "ConfigureName", "ConfigureSetting" }, "nci_wi_MachineConfigurations_132E765C043BF95A2570D2EA019DD783");
b.ToTable("MachineConfigurations");
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.MachineError", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConnectorId")
.HasColumnType("tinyint");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("ErrorCodeId")
.HasColumnType("int");
b.Property("ErrorInfo")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("PreStatus")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("int");
b.Property("VendorErrorCode")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("VendorId")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.HasKey("Id")
.HasName("PK_dbo.MachineError");
b.ToTable("MachineError", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.MachineOperateRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Action")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("EvseStatus")
.HasColumnType("int")
.HasColumnName("EVSE_Status");
b.Property("EvseValue")
.HasColumnType("nvarchar(max)")
.HasColumnName("EVSE_Value");
b.Property("FinishedOn")
.HasColumnType("datetime");
b.Property("ReportedOn")
.HasColumnType("datetime");
b.Property("RequestContent")
.HasColumnType("nvarchar(max)");
b.Property("RequestType")
.HasColumnType("int");
b.Property("SerialNo")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id")
.HasName("PK_dbo.MachineOperateRecord");
b.ToTable("MachineOperateRecord", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.MachineVersionFile", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("Seq")
.HasColumnType("int");
b.Property("UploadFileId")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.HasKey("Id")
.HasName("PK_dbo.MachineVersionFile");
b.HasIndex("UploadFileId");
b.ToTable("MachineVersionFile", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.MigrationHistory", b =>
{
b.Property("MigrationId")
.HasMaxLength(150)
.HasColumnType("nvarchar(150)");
b.Property("ContextKey")
.HasMaxLength(300)
.HasColumnType("nvarchar(300)");
b.Property("Model")
.IsRequired()
.HasColumnType("varbinary(max)");
b.Property("ProductVersion")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.HasKey("MigrationId", "ContextKey")
.HasName("PK_dbo.__MigrationHistory");
b.ToTable("__MigrationHistory", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.Ocmf", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("DataString")
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.Property("PublicKey")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("TransactionId")
.HasColumnType("int");
b.HasKey("Id")
.HasName("PK_dbo.OCMF");
b.ToTable("OCMF", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.ServerMessage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedBy")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("InMessage")
.HasColumnType("nvarchar(max)");
b.Property("OutAction")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)");
b.Property("OutRequest")
.HasColumnType("nvarchar(max)");
b.Property("ReceivedOn")
.HasColumnType("datetime");
b.Property("SerialNo")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("UpdatedOn")
.HasColumnType("datetime");
b.HasKey("Id")
.HasName("PK_dbo.ServerMessage");
b.HasIndex(new[] { "ReceivedOn", "UpdatedOn", "CreatedOn" }, "nci_wi_ServerMessage_EC00C205420F6CB01974705B93F9507F");
b.ToTable("ServerMessage", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.TransactionRecord", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("BillingDone")
.HasColumnType("bit");
b.Property("ChargeBoxId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConnectorId")
.HasColumnType("tinyint");
b.Property("Cost")
.HasColumnType("decimal(18, 2)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("CustomerId")
.HasColumnType("uniqueidentifier");
b.Property("ErrorMsg")
.HasColumnType("nvarchar(max)");
b.Property("Evccid")
.HasMaxLength(30)
.HasColumnType("nvarchar(30)")
.HasColumnName("EVCCID");
b.Property("Fee")
.HasMaxLength(1500)
.HasColumnType("nvarchar(1500)");
b.Property("MeterStart")
.HasColumnType("decimal(18, 2)");
b.Property("MeterStop")
.HasColumnType("decimal(18, 2)");
b.Property("NotifyPnC")
.HasColumnType("bit");
b.Property("Receipt")
.HasMaxLength(3000)
.HasColumnType("nvarchar(3000)");
b.Property("ReservationId")
.HasColumnType("int");
b.Property("RetryStartTransactionTimes")
.HasColumnType("int");
b.Property("RetryStopTransactionTimes")
.HasColumnType("int");
b.Property("StartIdTag")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("StartSoc")
.HasMaxLength(3)
.HasColumnType("nvarchar(3)")
.HasColumnName("StartSOC");
b.Property("StartTime")
.HasColumnType("datetime");
b.Property("StartTransactionReportedOn")
.HasColumnType("datetime");
b.Property("StopIdTag")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property("StopReason")
.HasMaxLength(60)
.HasColumnType("nvarchar(60)");
b.Property("StopReasonId")
.HasColumnType("int");
b.Property("StopSoc")
.HasMaxLength(3)
.HasColumnType("nvarchar(3)")
.HasColumnName("StopSOC");
b.Property("StopTime")
.HasColumnType("datetime");
b.Property("StopTransactionReportedOn")
.HasColumnType("datetime");
b.Property("UpdatedOn")
.HasColumnType("datetime");
b.Property("UploadedtoTtia")
.HasColumnType("bit")
.HasColumnName("UploadedtoTTIA");
b.HasKey("Id")
.HasName("PK_dbo.TransactionRecord");
b.HasIndex(new[] { "CustomerId", "ConnectorId", "StartTime", "ChargeBoxId" }, "IX_TransactionRecord_StartTime");
b.HasIndex(new[] { "CustomerId", "StopTransactionReportedOn", "StopTime" }, "nci_wi_TransactionRecord_92D4DF08E7034102014AC91760F890FE");
b.ToTable("TransactionRecord", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.UploadFile", b =>
{
b.Property("Id")
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("CreatedBy")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("FileExtensionName")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("FileMd5")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("FileMD5");
b.Property("FileName")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property("FilePath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property("FileSize")
.HasColumnType("int");
b.Property("FileType")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("FileUrl")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.Property("ModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ModuleId")
.HasColumnType("int");
b.Property("OriginName")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property("VendorId")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id")
.HasName("PK_dbo.UploadFile");
b.ToTable("UploadFile", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.VConnectorStatus", b =>
{
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ChargePointErrorCodeId")
.HasColumnType("int");
b.Property("ConnectorId")
.HasColumnType("tinyint");
b.Property("CreatedOn")
.HasColumnType("datetime");
b.Property("ErrorInfo")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("Id")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("Status")
.HasColumnType("int");
b.Property("TotalEnergy")
.HasColumnType("decimal(10, 2)");
b.Property("Type")
.HasColumnType("int");
b.Property("VendorErrorCode")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("VendorId")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.ToTable((string)null);
b.ToView("vConnectorStatus", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.VConnectorStatusCombind", b =>
{
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ChargePointErrorCodeId")
.HasColumnType("int");
b.Property("ConnectorId")
.HasColumnType("tinyint");
b.Property("Ocpp")
.IsRequired()
.HasMaxLength(3)
.IsUnicode(false)
.HasColumnType("varchar(3)")
.HasColumnName("OCPP");
b.Property("Status")
.HasColumnType("int");
b.Property("TotalEnergy")
.HasColumnType("decimal(10, 2)");
b.Property("Type")
.HasColumnType("int");
b.Property("VendorErrorCode")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.ToTable((string)null);
b.ToView("vConnectorStatusCombind", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.VMachine", b =>
{
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConnectionType")
.HasColumnType("int");
b.Property("ConnectorType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CustomerId")
.HasColumnType("uniqueidentifier");
b.Property("GunAmt")
.HasColumnType("int");
b.Property("HeartbeatUpdatedOn")
.HasColumnType("datetime");
b.Property("Id")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("IsDelete")
.HasColumnType("bit");
b.Property("ModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("OfflineOn")
.HasColumnType("datetime");
b.Property("Online")
.HasColumnType("bit");
b.Property("RatedPower")
.HasColumnType("decimal(6, 2)");
b.Property("Ttiatag")
.HasColumnType("int")
.HasColumnName("TTIATag");
b.Property("VendorId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.ToTable((string)null);
b.ToView("vMachine", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.VMachineCombind", b =>
{
b.Property("ChargeBoxId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("ConnectionType")
.HasColumnType("int");
b.Property("ConnectorType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("CustomerId")
.HasColumnType("uniqueidentifier");
b.Property("GunAmt")
.HasColumnType("int");
b.Property("HeartbeatUpdatedOn")
.HasColumnType("datetime");
b.Property("Id")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
b.Property("IsDelete")
.HasColumnType("bit");
b.Property("ModelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("Ocpp")
.IsRequired()
.HasMaxLength(3)
.IsUnicode(false)
.HasColumnType("varchar(3)")
.HasColumnName("OCPP");
b.Property("OfflineOn")
.HasColumnType("datetime");
b.Property("Online")
.HasColumnType("bit");
b.Property("RatedPower")
.HasColumnType("decimal(6, 2)");
b.Property("Ttiatag")
.HasColumnType("int")
.HasColumnName("TTIATag");
b.Property("VendorId")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.ToTable((string)null);
b.ToView("vMachineCombind", (string)null);
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.Machine", b =>
{
b.HasOne("EVCB_OCPP.Domain.Models.MainDb.Customer", "Customer")
.WithMany("Machines")
.HasForeignKey("CustomerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_dbo.Machine_dbo.Customer_CustomerId");
b.Navigation("Customer");
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.MachineVersionFile", b =>
{
b.HasOne("EVCB_OCPP.Domain.Models.MainDb.UploadFile", "UploadFile")
.WithMany("MachineVersionFiles")
.HasForeignKey("UploadFileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_dbo.MachineVersionFile_dbo.UploadFile_UploadFileId");
b.Navigation("UploadFile");
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.Customer", b =>
{
b.Navigation("Machines");
});
modelBuilder.Entity("EVCB_OCPP.Domain.Models.MainDb.UploadFile", b =>
{
b.Navigation("MachineVersionFiles");
});
#pragma warning restore 612, 618
}
}
}