Browse Source

2020/06/08 Jessica
Actions:
1.所有 ChargeBoxId 長度從128 調降成 50
2.OTA 砍掉無用欄位

Jessica.Tseng 4 years ago
parent
commit
e07ea1e5bf
27 changed files with 472 additions and 39 deletions
  1. 1 1
      EVCB_OCPP.Domain/App.config
  2. 2 0
      EVCB_OCPP.Domain/ConnectionLogDBContext.cs
  3. 14 0
      EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj
  4. 58 4
      EVCB_OCPP.Domain/MainDBContext.cs
  5. 3 1
      EVCB_OCPP.Domain/MainDBContextMigrations/201907310322180_Add_ChargeBoxId.Designer.cs
  6. 29 0
      EVCB_OCPP.Domain/MainDBContextMigrations/202006080138316_ModifiedChargeBoxIdLenAndOTAFields.Designer.cs
  7. 54 0
      EVCB_OCPP.Domain/MainDBContextMigrations/202006080138316_ModifiedChargeBoxIdLenAndOTAFields.cs
  8. 120 0
      EVCB_OCPP.Domain/MainDBContextMigrations/202006080138316_ModifiedChargeBoxIdLenAndOTAFields.resx
  9. 29 0
      EVCB_OCPP.Domain/MeterValueDBContextMigrations/202006080139122_ModifiedChargeBoxIdLen.Designer.cs
  10. 18 0
      EVCB_OCPP.Domain/MeterValueDBContextMigrations/202006080139122_ModifiedChargeBoxIdLen.cs
  11. 126 0
      EVCB_OCPP.Domain/MeterValueDBContextMigrations/202006080139122_ModifiedChargeBoxIdLen.resx
  12. 1 1
      EVCB_OCPP.Domain/Models/Database/ConnectorMeterValueRecord.cs
  13. 1 1
      EVCB_OCPP.Domain/Models/Database/ConnectorStatus.cs
  14. 1 1
      EVCB_OCPP.Domain/Models/Database/Machine.cs
  15. 1 1
      EVCB_OCPP.Domain/Models/Database/MachineConfiguration.cs
  16. 1 1
      EVCB_OCPP.Domain/Models/Database/MachineConnectionLog.cs
  17. 1 1
      EVCB_OCPP.Domain/Models/Database/MachineError.cs
  18. 1 1
      EVCB_OCPP.Domain/Models/Database/MachineOperateRecord.cs
  19. 3 10
      EVCB_OCPP.Domain/Models/Database/MachineVersionFile.cs
  20. 1 1
      EVCB_OCPP.Domain/Models/Database/ServerMessage.cs
  21. 1 1
      EVCB_OCPP.Domain/Models/Database/TransactionDataRecord.cs
  22. 1 1
      EVCB_OCPP.Domain/Models/Database/TransactionRecord.cs
  23. 1 10
      EVCB_OCPP.Domain/Models/Database/UploadFile.cs
  24. 1 1
      EVCB_OCPP.Domain/Properties/AssemblyInfo.cs
  25. 1 1
      EVCB_OCPP.MailService/Properties/AssemblyInfo.cs
  26. 1 0
      EVCB_OCPP.Packet/Features/CoreProfile.cs
  27. 1 1
      EVCB_OCPP.Packet/Properties/AssemblyInfo.cs

+ 1 - 1
EVCB_OCPP.Domain/App.config

@@ -15,7 +15,7 @@
     </providers>
   </entityFramework>
   <connectionStrings>
-    <add name="ConnectionLogDBContext" connectionString="data source=172.1.2.187\SQLEXPRESS2017;initial catalog=StandardOCPP_ConnectionLog;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
+    <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="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" />
    

+ 2 - 0
EVCB_OCPP.Domain/ConnectionLogDBContext.cs

@@ -3,6 +3,7 @@
     using EVCB_OCPP.Domain.Models.Database;
     using System;
     using System.Data.Entity;
+    using System.Data.Entity.Migrations;
     using System.Linq;
 
     public class ConnectionLogDBContext : DbContext
@@ -16,6 +17,7 @@
         public ConnectionLogDBContext()
             : base("name=ConnectionLogDBContext")
         {
+           
             Database.SetInitializer<ConnectionLogDBContext>(null);
             this.Configuration.AutoDetectChangesEnabled = false;
             this.Configuration.ValidateOnSaveEnabled = false;

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

@@ -186,6 +186,10 @@
     <Compile Include="MainDBContextMigrations\202005290620325_Modified_UploadFileId.Designer.cs">
       <DependentUpon>202005290620325_Modified_UploadFileId.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\202006080138316_ModifiedChargeBoxIdLenAndOTAFields.cs" />
+    <Compile Include="MainDBContextMigrations\202006080138316_ModifiedChargeBoxIdLenAndOTAFields.Designer.cs">
+      <DependentUpon>202006080138316_ModifiedChargeBoxIdLenAndOTAFields.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -208,6 +212,10 @@
     <Compile Include="MeterValueDBContextMigrations\201908010559159_Add_TransactionId.Designer.cs">
       <DependentUpon>201908010559159_Add_TransactionId.cs</DependentUpon>
     </Compile>
+    <Compile Include="MeterValueDBContextMigrations\202006080139122_ModifiedChargeBoxIdLen.cs" />
+    <Compile Include="MeterValueDBContextMigrations\202006080139122_ModifiedChargeBoxIdLen.Designer.cs">
+      <DependentUpon>202006080139122_ModifiedChargeBoxIdLen.cs</DependentUpon>
+    </Compile>
     <Compile Include="MeterValueDBContextMigrations\Configuration.cs" />
     <Compile Include="Models\Database\ApiLogEntry.cs" />
     <Compile Include="Models\Database\ConnectorMeterValueRecord.cs" />
@@ -331,6 +339,9 @@
     <EmbeddedResource Include="MainDBContextMigrations\202005290620325_Modified_UploadFileId.resx">
       <DependentUpon>202005290620325_Modified_UploadFileId.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\202006080138316_ModifiedChargeBoxIdLenAndOTAFields.resx">
+      <DependentUpon>202006080138316_ModifiedChargeBoxIdLenAndOTAFields.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>
@@ -346,6 +357,9 @@
     <EmbeddedResource Include="MeterValueDBContextMigrations\201908010559159_Add_TransactionId.resx">
       <DependentUpon>201908010559159_Add_TransactionId.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MeterValueDBContextMigrations\202006080139122_ModifiedChargeBoxIdLen.resx">
+      <DependentUpon>202006080139122_ModifiedChargeBoxIdLen.cs</DependentUpon>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup />
   <ItemGroup>

+ 58 - 4
EVCB_OCPP.Domain/MainDBContext.cs

@@ -3,7 +3,10 @@
     using EVCB_OCPP.Domain.Models.Database;
     using System;
     using System.Data.Entity;
+    using System.Data.Entity.Validation;
     using System.Linq;
+    using System.Threading;
+    using System.Threading.Tasks;
 
     public class MainDBContext : DbContext
     {
@@ -33,7 +36,7 @@
         // 針對您要包含在模型中的每種實體類型新增 DbSet。如需有關設定和使用
         // Code First 模型的詳細資訊,請參閱 http://go.microsoft.com/fwlink/?LinkId=390109。
 
-       
+
 
         public virtual DbSet<ConnectorStatus> ConnectorStatus { get; set; }
 
@@ -51,7 +54,7 @@
 
         public virtual DbSet<MachineOperateRecord> MachineOperateRecord { get; set; }
 
- 
+
 
         public virtual DbSet<MachineVersionFile> MachineVersionFile { get; set; }
 
@@ -65,7 +68,7 @@
 
         protected override void OnModelCreating(DbModelBuilder modelBuilder)
         {
-           
+
 
 
             modelBuilder.Entity<Machine>().Property(x => x.Longitude).HasPrecision(10, 6);
@@ -74,7 +77,58 @@
             base.OnModelCreating(modelBuilder);
 
         }
-    }
+
+        public override int SaveChanges()
+        {
+            try
+            {
+                return base.SaveChanges();
+
+            }
+            catch (DbEntityValidationException ex)
+            {
+                var errorMessages = ex.EntityValidationErrors
+                   .SelectMany(x => x.ValidationErrors)
+                   .Select(x => x.ErrorMessage);
+
+                // Join the list to a single string.
+                var fullErrorMessage = string.Join("; ", errorMessages);
+
+                // Combine the original exception message with the new one.
+                var exceptionMessage = string.Concat(ex.Message, " The validation errors are: ", fullErrorMessage);
+
+                // Throw a new DbEntityValidationException with the improved exception message.
+                throw new DbEntityValidationException(exceptionMessage, ex.EntityValidationErrors);
+            }
+        }
+        public override Task<int> SaveChangesAsync(CancellationToken cancellationToken)
+        {
+            try
+            {
+                return base.SaveChangesAsync(cancellationToken);
+
+            }
+            catch (DbEntityValidationException ex)
+            {
+                var errorMessages = ex.EntityValidationErrors
+                   .SelectMany(x => x.ValidationErrors)
+                   .Select(x => x.ErrorMessage);
+
+                // Join the list to a single string.
+                var fullErrorMessage = string.Join("; ", errorMessages);
+
+                // Combine the original exception message with the new one.
+                var exceptionMessage = string.Concat(ex.Message, " The validation errors are: ", fullErrorMessage);
+
+                // Throw a new DbEntityValidationException with the improved exception message.
+                throw new DbEntityValidationException(exceptionMessage, ex.EntityValidationErrors);
+            }
+        }
+
+
+
+    
+}
 
 
 

+ 3 - 1
EVCB_OCPP.Domain/MainDBContextMigrations/201907310322180_Add_ChargeBoxId.Designer.cs

@@ -7,7 +7,9 @@ namespace EVCB_OCPP.Domain.MainDBContextMigrations
     using System.Resources;
     
     [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
-    public sealed partial class Add_ChargeBoxId : IMigrationMetadata
+    public sealed partial class Add_
+        
+        : IMigrationMetadata
     {
         private readonly ResourceManager Resources = new ResourceManager(typeof(Add_ChargeBoxId));
         

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

+ 54 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202006080138316_ModifiedChargeBoxIdLenAndOTAFields.cs

@@ -0,0 +1,54 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class ModifiedChargeBoxIdLenAndOTAFields : DbMigration
+    {
+        public override void Up()
+        {
+            DropIndex("dbo.Machine", new[] { "ChargeBoxId" });
+            DropIndex("dbo.TransactionRecord", "IX_1202_Issue_Report");
+            DropIndex("dbo.TransactionRecord", "IX_MachineId");
+            AddColumn("dbo.MachineVersionFile", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.ConnectorStatus", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.Machine", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.MachineConfigurations", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.MachineError", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.MachineOperateRecord", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.ServerMessage", "ChargeBoxId", c => c.String(maxLength: 50));
+            AlterColumn("dbo.TransactionRecord", "ChargeBoxId", c => c.String(nullable: false, maxLength: 50));
+            CreateIndex("dbo.Machine", "ChargeBoxId", unique: true);
+            CreateIndex("dbo.TransactionRecord", new[] { "ChargeBoxId", "ConnectorId", "StartTime" }, unique: true, name: "IX_1202_Issue_Report");
+            CreateIndex("dbo.TransactionRecord", "ChargeBoxId", name: "IX_MachineId");
+            DropColumn("dbo.MachineVersionFile", "UpdatedOn");
+            DropColumn("dbo.MachineVersionFile", "MachineId");
+            DropColumn("dbo.MachineVersionFile", "DownloadedOn");
+            DropColumn("dbo.UploadFile", "IsOnline");
+            DropColumn("dbo.UploadFile", "CustomerId");
+        }
+        
+        public override void Down()
+        {
+            AddColumn("dbo.UploadFile", "CustomerId", c => c.Guid(nullable: false));
+            AddColumn("dbo.UploadFile", "IsOnline", c => c.Boolean(nullable: false));
+            AddColumn("dbo.MachineVersionFile", "DownloadedOn", c => c.DateTime());
+            AddColumn("dbo.MachineVersionFile", "MachineId", c => c.Guid(nullable: false));
+            AddColumn("dbo.MachineVersionFile", "UpdatedOn", c => c.DateTime());
+            DropIndex("dbo.TransactionRecord", "IX_MachineId");
+            DropIndex("dbo.TransactionRecord", "IX_1202_Issue_Report");
+            DropIndex("dbo.Machine", new[] { "ChargeBoxId" });
+            AlterColumn("dbo.TransactionRecord", "ChargeBoxId", c => c.String(nullable: false, maxLength: 128));
+            AlterColumn("dbo.ServerMessage", "ChargeBoxId", c => c.String(maxLength: 128));
+            AlterColumn("dbo.MachineOperateRecord", "ChargeBoxId", c => c.String(maxLength: 128));
+            AlterColumn("dbo.MachineError", "ChargeBoxId", c => c.String(maxLength: 128));
+            AlterColumn("dbo.MachineConfigurations", "ChargeBoxId", c => c.String(maxLength: 128));
+            AlterColumn("dbo.Machine", "ChargeBoxId", c => c.String(maxLength: 128));
+            AlterColumn("dbo.ConnectorStatus", "ChargeBoxId", c => c.String(maxLength: 128));
+            DropColumn("dbo.MachineVersionFile", "ChargeBoxId");
+            CreateIndex("dbo.TransactionRecord", "ChargeBoxId", name: "IX_MachineId");
+            CreateIndex("dbo.TransactionRecord", new[] { "ChargeBoxId", "ConnectorId", "StartTime" }, unique: true, name: "IX_1202_Issue_Report");
+            CreateIndex("dbo.Machine", "ChargeBoxId", unique: true);
+        }
+    }
+}

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


+ 29 - 0
EVCB_OCPP.Domain/MeterValueDBContextMigrations/202006080139122_ModifiedChargeBoxIdLen.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.MeterValueDBContextMigrations
+{
+    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 ModifiedChargeBoxIdLen : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(ModifiedChargeBoxIdLen));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202006080139122_ModifiedChargeBoxIdLen"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 18 - 0
EVCB_OCPP.Domain/MeterValueDBContextMigrations/202006080139122_ModifiedChargeBoxIdLen.cs

@@ -0,0 +1,18 @@
+namespace EVCB_OCPP.Domain.MeterValueDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class ModifiedChargeBoxIdLen : DbMigration
+    {
+        public override void Up()
+        {
+            AlterColumn("dbo.ConnectorMeterValueRecord", "ChargeBoxId", c => c.String(maxLength: 50));
+        }
+        
+        public override void Down()
+        {
+            AlterColumn("dbo.ConnectorMeterValueRecord", "ChargeBoxId", c => c.String(maxLength: 128));
+        }
+    }
+}

+ 126 - 0
EVCB_OCPP.Domain/MeterValueDBContextMigrations/202006080139122_ModifiedChargeBoxIdLen.resx

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Target" xml:space="preserve">
+    <value>H4sIAAAAAAAEAM1Y227jNhB9L9B/EPScteykLdpA3kUsJ0XQODYib14LWhrbRClSJanA/rZ96Cf1Fzq633yVjUXf7CF5ODMczuHRv9/+sb9sAmZ8gFRU8KE56PVNA7gnfMpXQzPSy0+/ml8+//iD/egHG+M9n3cXz8OVXA3NtdbhvWUpbw0BUb2AelIosdQ9TwQW8YV12+//Zg0GFiCEiViGYb9FXNMAkj/41xHcg1BHhE2ED0xldhxxE1TjlQSgQuLB0Hx8d0Z/Tp3ZrDcWAaHcNB4YJeiHC2xpGoRzoYlGL++/KnC1FHzlhmggbL4NAectCVOQeX9fTj81kP5tHIhVLsyhvEhp9Og8wMFdlhmrubxTfs0ic5i7R8yx3sZRJ/kbmphmDp4WcgIa5DthEbyBJ6RvGs3d7x0m45XtfPfSI+qNiSYLoqC3F/XGaK69KSqo38NS6/VvDCdiOpIw5BBpSdiNMYsWjHp/wHYu/gI+5BFj1agwLhyrGdA0kyIEqbdvsMxifcagrPo6q7mwWFZZkwb9zPUvP5nGK25OFgyKoqkkyMWI4XfgIIkGf0Y0Bs9jDEjS3tq9sZezJnIFI7EpN8VixVtnGhOyeQG+0uuh+TNesye6AT83ZH585RTvKK7RMoKjW+UHVG412mrYEd5hnLkkXBEvjr6Wqbvbs6HQJQ0bfSnMk5ABuRhlAkRFGJt/KdBsjffhUpAX4ZFrpDi5iAdKa3CN0sLJF6ffkRDfoCnPYbCzwBzZ4QiSbZUNrt324grDjgOyOOS8OY1HWfXt6HpIGVnjU1kC6q6n2C7o4x21dC6lpv19cndYRQAlGVopG+asae2hTXtCwhCPu0KjmcVwUw51Prnn00uQYlie2sEyhbfFThgoWUFjNM6YD09UKp3zh2k4ftCatuu49hxFvuOxE2lyRnlAOUL8O0Vpkd7JsGWynzD+AMkgSQUU7p7hYoLmeoQRuYOpHMGigO9ju0Ora9xThakNnIFXJZgaXnXgdLwG0VQRG0Nn+ZgzTsPD3Hw6Vkk7VajSejpSjXqqYLWB0/EKBqpiFcbTcaokVIWq2k9Hy6ioCpSZTsfImaYKktvOqIKSa2pVUJrbWLbVuNDNRmK1Oknj3dlsVYe6fXNKsXvR9Rvd3c467XHl1Gq96RTTwCR9UD9uu+5WaQiSt33P/Zs5jGK85YQJ4XQJSqdPcxPly21Dfv1/pJCllM+66qHvLjgWdEXjTB9VFec+rtoyg38Q6aG5JTRK6I6qQlO+TaK4hrDoAtSSFV1AmqKiC8YOSdEFpiEoukC05UQXlJqY2FlAg7MLqK4dOh13Uzn4+FdfWzm0X6zfRROkzRljWggML43l+hKiTR62Vf04Z49B0VUJYWcuYEWVoPmcZ74U+RFhPqoe5VNa90QTPDTyIDVdYgfAYQ+USrRqEh4+xYMF+M98Gukw0g9KQbBgta8rtnV4/0Qn1X22p2H8T10jBHSTxnU35aOIMr/w+2lH3e2BiCss6/noFWp1hFttC6RXwU8EytI3hhB4zBhzCEKGYGrKXfIBXXxDRfwCK+Jt8zfAfpDjB1FPuz2mZCVJoDKMcn38wdmKvzh//g8dTOAjoxYAAA==</value>
+  </data>
+  <data name="DefaultSchema" xml:space="preserve">
+    <value>dbo</value>
+  </data>
+</root>

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/ConnectorMeterValueRecord.cs

@@ -19,7 +19,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         [Key]
         public Int64 Id { set; get; }
 
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         public byte ConnectorId { set; get; }

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/ConnectorStatus.cs

@@ -23,7 +23,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         [StringLength(36)]
         public string Id { get; set; }
 
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         public byte ConnectorId { set; get; }

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/Machine.cs

@@ -36,7 +36,7 @@
         /// ChargeBoxId
         /// </summary>
         [Index("IX_ChargeBoxId", IsUnique = true)]
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         /// <summary>

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/MachineConfiguration.cs

@@ -23,7 +23,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         [Key]
         public Int32 Id { set; get; }
 
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         /// <summary>

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/MachineConnectionLog.cs

@@ -20,7 +20,7 @@ namespace EVCB_OCPP.Domain.Models.Database
 
         public Int64 Id { set; get; }
 
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
 

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/MachineError.cs

@@ -21,7 +21,7 @@ namespace EVCB_OCPP.Domain.Models.Database
 
 
 
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         /// <summary>

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/MachineOperateRecord.cs

@@ -37,7 +37,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// <summary>
         /// 機器的客戶自訂ID
         /// </summary>
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
 

+ 3 - 10
EVCB_OCPP.Domain/Models/Database/MachineVersionFile.cs

@@ -19,21 +19,14 @@
         [Required]
         public DateTime CreatedOn { get; set; }
 
-        /// <summary>
-        /// 更新日期
-        /// </summary>     
-        public DateTime? UpdatedOn { get; set; }
 
-      
-        public Guid MachineId { get; set; }
+
+        [StringLength(50)]
+        public string ChargeBoxId { get; set; }
 
         [Required]
         public string UploadFileId { get; set; }
 
-        /// <summary>
-        /// 下載日期
-        /// </summary>
-        public DateTime? DownloadedOn { get; set; }
 
         /// <summary>
         /// 排序

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/ServerMessage.cs

@@ -29,7 +29,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// <summary>
         /// 機器的客戶自訂ID
         /// </summary>
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         /// <summary>

+ 1 - 1
EVCB_OCPP.Domain/Models/Database/TransactionDataRecord.cs

@@ -22,7 +22,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// <summary>
         /// chargePointSerialNumber
         /// </summary>       
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
 

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

@@ -54,7 +54,7 @@
         [Index("IX_MachineId")]
         [Index("IX_1202_Issue_Report", Order = 1, IsUnique = true)]
         [Required]
-        [StringLength(128)]
+        [StringLength(50)]
         public string ChargeBoxId { get; set; }
 
         /// <summary>

+ 1 - 10
EVCB_OCPP.Domain/Models/Database/UploadFile.cs

@@ -60,16 +60,7 @@
         public DateTime CreatedOn { get; set; }
 
         [StringLength(50)]      
-        public string CreatedBy { get; set; }
-
-        /// <summary>
-        /// 是否有效
-        /// </summary>       
-        public bool IsOnline { get; set; }       
-
-    
-        public Guid CustomerId { get; set; }
-
+        public string CreatedBy { 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("3ff61e2")]
+[assembly: AssemblyInformationalVersion("9081625")]

+ 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("3ff61e2")]
+[assembly: AssemblyInformationalVersion("9081625")]

+ 1 - 0
EVCB_OCPP.Packet/Features/CoreProfile.cs

@@ -29,6 +29,7 @@ namespace EVCB_OCPP.Packet.Features
             features.Add(new ResetFeature());
             features.Add(new UnlockConnectorFeature());
             features.Add(new ClearCacheFeature());
+            features.Add(new DataTransferFeature());
 
             actions.Add(Actions.BootNotification.ToString());
             actions.Add(Actions.GetConfiguration.ToString());

+ 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("3ff61e2")]
+[assembly: AssemblyInformationalVersion("9081625")]

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