瀏覽代碼

1.新增customer api 參數

Jessica Tseng 3 年之前
父節點
當前提交
69ed52fd5b

+ 1 - 1
EVCB_OCPP.Domain/App.config

@@ -16,7 +16,7 @@
   </entityFramework>
   <connectionStrings>
     <add name="ConnectionLogDBContext" connectionString="data source=172.1.2.187,1434\SQLEXPRESS2017;initial catalog=StandardOCPP_ConnectionLog;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
-    <add name="MainDBContext" connectionString="data source=172.1.2.187\SQLEXPRESS2017;initial catalog=StandardOCPP_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
+    <add name="MainDBContext" connectionString="data source=.\SQLEXPRESS;initial catalog=StandardOCPP_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
     <add name="MeterValueDBContext" connectionString="data source=172.1.2.187\SQLEXPRESS2017;initial catalog=StandardOCPP_MeterValue;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    
 </connectionStrings>

+ 7 - 0
EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj

@@ -210,6 +210,10 @@
     <Compile Include="MainDBContextMigrations\202010270320421_Add_Customer_TTIA_Fields.Designer.cs">
       <DependentUpon>202010270320421_Add_Customer_TTIA_Fields.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\202105310249294_Add_Customer_TTIAAPI_Fields.cs" />
+    <Compile Include="MainDBContextMigrations\202105310249294_Add_Customer_TTIAAPI_Fields.Designer.cs">
+      <DependentUpon>202105310249294_Add_Customer_TTIAAPI_Fields.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -377,6 +381,9 @@
     <EmbeddedResource Include="MainDBContextMigrations\202010270320421_Add_Customer_TTIA_Fields.resx">
       <DependentUpon>202010270320421_Add_Customer_TTIA_Fields.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\202105310249294_Add_Customer_TTIAAPI_Fields.resx">
+      <DependentUpon>202105310249294_Add_Customer_TTIAAPI_Fields.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>

+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202105310249294_Add_Customer_TTIAAPI_Fields.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class Add_Customer_TTIAAPI_Fields : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(Add_Customer_TTIAAPI_Fields));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202105310249294_Add_Customer_TTIAAPI_Fields"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 20 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202105310249294_Add_Customer_TTIAAPI_Fields.cs

@@ -0,0 +1,20 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class Add_Customer_TTIAAPI_Fields : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.Customer", "TTIA_APIUrl", c => c.String(maxLength: 100));
+            AddColumn("dbo.Customer", "TTIA_APIKey", c => c.String(maxLength: 10));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.Customer", "TTIA_APIKey");
+            DropColumn("dbo.Customer", "TTIA_APIUrl");
+        }
+    }
+}

File diff suppressed because it is too large
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202105310249294_Add_Customer_TTIAAPI_Fields.resx


+ 6 - 0
EVCB_OCPP.Domain/Models/Database/Customer.cs

@@ -110,6 +110,12 @@ namespace EVCB_OCPP.Domain.Models.Database
 
         public int TTIA_CustomerId { set; get; }
 
+        [StringLength(100)]
+        public string TTIA_APIUrl { set; get; }
+
+        [StringLength(10)]
+        public string TTIA_APIKey { set; get; }
+
 
         public Customer()
         {

+ 1 - 1
EVCB_OCPP.Domain/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("63ae964")]
+[assembly: AssemblyInformationalVersion("df397fc")]

+ 1 - 1
EVCB_OCPP.MailService/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("63ae964")]
+[assembly: AssemblyInformationalVersion("df397fc")]

+ 1 - 1
EVCB_OCPP.Packet/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("63ae964")]
+[assembly: AssemblyInformationalVersion("df397fc")]

+ 1 - 1
EVCB_OCPP.Packet20/Properties/AssemblyInfo.cs

@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
 // [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
-[assembly: AssemblyInformationalVersion("63ae964")]
+[assembly: AssemblyInformationalVersion("df397fc")]

Some files were not shown because too many files changed in this diff