Browse Source

2020/04/23 Jessica
Actions:
1.Machine Table Add GeoLocation 、 ConnectorPowerType Fields

Jessica.Tseng 4 years ago
parent
commit
c4a64e3cc9

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

@@ -174,6 +174,10 @@
     <Compile Include="MainDBContextMigrations\202004170157424_Rename_MachineConfiguration.Designer.cs">
       <DependentUpon>202004170157424_Rename_MachineConfiguration.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\202004230638409_AddMachine_ConnectorPowerType_Geo.cs" />
+    <Compile Include="MainDBContextMigrations\202004230638409_AddMachine_ConnectorPowerType_Geo.Designer.cs">
+      <DependentUpon>202004230638409_AddMachine_ConnectorPowerType_Geo.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -317,6 +321,9 @@
     <EmbeddedResource Include="MainDBContextMigrations\202004170157424_Rename_MachineConfiguration.resx">
       <DependentUpon>202004170157424_Rename_MachineConfiguration.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\202004230638409_AddMachine_ConnectorPowerType_Geo.resx">
+      <DependentUpon>202004230638409_AddMachine_ConnectorPowerType_Geo.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>

+ 2 - 1
EVCB_OCPP.Domain/MainDBContext.cs

@@ -90,7 +90,8 @@
                 .WillCascadeOnDelete(false);
 
 
-
+            modelBuilder.Entity<Machine>().Property(x => x.Longitude).HasPrecision(10, 6);
+            modelBuilder.Entity<Machine>().Property(x => x.Latitude).HasPrecision(10, 6);
 
             base.OnModelCreating(modelBuilder);
 

+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202004230638409_AddMachine_ConnectorPowerType_Geo.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 AddMachine_ConnectorPowerType_Geo : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(AddMachine_ConnectorPowerType_Geo));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202004230638409_AddMachine_ConnectorPowerType_Geo"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 22 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202004230638409_AddMachine_ConnectorPowerType_Geo.cs

@@ -0,0 +1,22 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class AddMachine_ConnectorPowerType_Geo : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.Machine", "ConnectorPowerType", c => c.String(maxLength: 50));
+            AddColumn("dbo.Machine", "Latitude", c => c.Decimal(nullable: false, precision: 10, scale: 6));
+            AddColumn("dbo.Machine", "Longitude", c => c.Decimal(nullable: false, precision: 10, scale: 6));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.Machine", "Longitude");
+            DropColumn("dbo.Machine", "Latitude");
+            DropColumn("dbo.Machine", "ConnectorPowerType");
+        }
+    }
+}

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


+ 12 - 0
EVCB_OCPP.Domain/Models/Database/Machine.cs

@@ -215,6 +215,18 @@
         [StringLength(50)]
         public string ConnectorType { get; set; }
 
+        /// <summary>
+        /// ConnectorPowerType
+        /// </summary>
+        [StringLength(50)]
+        public string ConnectorPowerType { get; set; }
+
+        [DataType("decimal(10 ,6)")]
+        public decimal Latitude { set; get; }
+
+        [DataType("decimal(10 ,6)")]
+        public decimal Longitude { set; get; }
+
 
 
 

+ 2 - 2
EVCB_OCPP.Domain/Models/Database/TransactionRecord.cs

@@ -96,13 +96,13 @@
         /// <summary>
         /// 開始meter
         /// </summary>
-        [DataType("decimal(16 ,2")]
+        [DataType("decimal(16 ,2)")]
         public decimal MeterStart { get; set; }
 
         /// <summary>
         /// 結束meter
         /// </summary>
-        [DataType("decimal(16 ,2")]
+        [DataType("decimal(16 ,2)")]
         public decimal MeterStop { get; set; }      
 
         /// <summary>

+ 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("6fce7a2")]
+[assembly: AssemblyInformationalVersion("c118c63")]

+ 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("6fce7a2")]
+[assembly: AssemblyInformationalVersion("c118c63")]

+ 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("6fce7a2")]
+[assembly: AssemblyInformationalVersion("c118c63")]

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