diff --git a/HTCoreServiceApp/Models/HT_Service_Log.cs b/HTCoreServiceApp/Models/HT_Service_Log.cs
deleted file mode 100644
index 407cd02..0000000
--- a/HTCoreServiceApp/Models/HT_Service_Log.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-
-namespace HTCoreServiceApp.Models
-{
- ///
- /// 采集运行日志
- ///
- public class HT_Service_Log
- {
- [Key]
- ///
- /// 编号
- ///
- public virtual int Id { get; set; }
- ///
- /// 创建时间
- ///
- public virtual DateTime EventTime { get; set; }
- ///
- /// 消息
- ///
- public virtual string? Message { get; set; }
- }
-}
diff --git a/HTCoreServiceApp/Models/LogAlarm.cs b/HTCoreServiceApp/Models/LogAlarm.cs
deleted file mode 100644
index 84320fa..0000000
--- a/HTCoreServiceApp/Models/LogAlarm.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class LogAlarm
-{
- public DateTime StartTime { get; set; }
-
- public string? Source { get; set; }
-
- public int? ConditionId { get; set; }
-
- public string? AlarmText { get; set; }
-
- public object? AlarmValue { get; set; }
-
- public int? Duration { get; set; }
-
- public int? Severity { get; set; }
-
- public int? SubAlarmType { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/LogEvent.cs b/HTCoreServiceApp/Models/LogEvent.cs
deleted file mode 100644
index b8af31b..0000000
--- a/HTCoreServiceApp/Models/LogEvent.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class LogEvent
-{
- public int? EventType { get; set; }
-
- public int? Severity { get; set; }
-
- public bool? IsAcked { get; set; }
-
- public DateTime ActiveTime { get; set; }
-
- public string? Source { get; set; }
-
- public string? Comment { get; set; }
-
- public int Sqlcounter { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/LogHdatum.cs b/HTCoreServiceApp/Models/LogHdatum.cs
deleted file mode 100644
index a94ae38..0000000
--- a/HTCoreServiceApp/Models/LogHdatum.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class LogHdatum
-{
- public short Id { get; set; }
-
- public DateTime TimeStamp { get; set; }
-
- public float Value { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/Membership.cs b/HTCoreServiceApp/Models/Membership.cs
deleted file mode 100644
index 566aaf7..0000000
--- a/HTCoreServiceApp/Models/Membership.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class Membership
-{
- public int Id { get; set; }
-
- public string UserName { get; set; } = null!;
-
- public string Password { get; set; } = null!;
-
- public short Role { get; set; }
-
- public string? Email { get; set; }
-
- public string? Phone { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/MetaCondition.cs b/HTCoreServiceApp/Models/MetaCondition.cs
deleted file mode 100644
index d0e9532..0000000
--- a/HTCoreServiceApp/Models/MetaCondition.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class MetaCondition
-{
- public int TypeId { get; set; }
-
- public string Source { get; set; } = null!;
-
- public int AlarmType { get; set; }
-
- public byte EventType { get; set; }
-
- public byte ConditionType { get; set; }
-
- public float Para { get; set; }
-
- public bool? IsEnabled { get; set; }
-
- public float DeadBand { get; set; }
-
- public int Delay { get; set; }
-
- public string? Comment { get; set; }
-
- public virtual MetaSubCondition? MetaSubCondition { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/MetaScale.cs b/HTCoreServiceApp/Models/MetaScale.cs
deleted file mode 100644
index c851cf8..0000000
--- a/HTCoreServiceApp/Models/MetaScale.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class MetaScale
-{
- public short ScaleId { get; set; }
-
- public byte ScaleType { get; set; }
-
- public float? Euhi { get; set; }
-
- public float? Eulo { get; set; }
-
- public float? RawHi { get; set; }
-
- public float? RawLo { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/MetaSubCondition.cs b/HTCoreServiceApp/Models/MetaSubCondition.cs
deleted file mode 100644
index f2a136a..0000000
--- a/HTCoreServiceApp/Models/MetaSubCondition.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class MetaSubCondition
-{
- public int ConditionId { get; set; }
-
- public int SubAlarmType { get; set; }
-
- public float Threshold { get; set; }
-
- public byte Severity { get; set; }
-
- public string? Message { get; set; }
-
- public bool? IsEnable { get; set; }
-
- public virtual MetaCondition Condition { get; set; } = null!;
-}
diff --git a/HTCoreServiceApp/Models/RegisterModule.cs b/HTCoreServiceApp/Models/RegisterModule.cs
deleted file mode 100644
index 3917cc5..0000000
--- a/HTCoreServiceApp/Models/RegisterModule.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class RegisterModule
-{
- public int DriverId { get; set; }
-
- public string? AssemblyName { get; set; }
-
- public string? ClassName { get; set; }
-
- public string? ClassFullName { get; set; }
-
- public string? Description { get; set; }
-}
diff --git a/HTCoreServiceApp/Models/ScadaContext.cs b/HTCoreServiceApp/Models/ScadaContext.cs
deleted file mode 100644
index 413642a..0000000
--- a/HTCoreServiceApp/Models/ScadaContext.cs
+++ /dev/null
@@ -1,252 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Configuration;
-
-namespace HTCoreServiceApp.Models;
-
-public partial class ScadaContext : DbContext
-{
- private string ConnectionStrings;
- public ScadaContext(string connectionStrings)
- {
- ConnectionStrings = connectionStrings;
- }
-
- [RequiresDynamicCode("Use 'MethodFriendlyToAot' instead")]
- [UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "")]
- public ScadaContext(DbContextOptions options)
- : base(options)
- {
- }
-
- public virtual DbSet Arguments { get; set; }
-
- public virtual DbSet HT_Service_Log { get; set; }
-
- public virtual DbSet LogAlarms { get; set; }
-
- public virtual DbSet LogEvents { get; set; }
-
- public virtual DbSet LogHdata { get; set; }
-
- public virtual DbSet Memberships { get; set; }
-
- public virtual DbSet MetaConditions { get; set; }
-
- public virtual DbSet MetaDrivers { get; set; }
-
- public virtual DbSet MetaGroups { get; set; }
-
- public virtual DbSet MetaScales { get; set; }
-
- public virtual DbSet MetaSubConditions { get; set; }
-
- public virtual DbSet MetaTags { get; set; }
-
- public virtual DbSet RegisterModules { get; set; }
-
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
-#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
- //=> optionsBuilder.UseSqlServer("Data Source=localhost\\SQLEXPRESS;Initial Catalog=SCADA;Integrated Security=True;Encrypt=True;TrustServerCertificate=True;");//localhost
- => optionsBuilder.UseSqlServer(ConnectionStrings);//32
-
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("Argument");
-
- entity.Property(e => e.Id).HasColumnName("ID");
- entity.Property(e => e.DriverId).HasColumnName("DriverID");
- entity.Property(e => e.PropertyName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PropertyValue)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.StartTime);
-
- entity.ToTable("Log_Alarm");
-
- entity.Property(e => e.StartTime).HasColumnType("datetime");
- entity.Property(e => e.AlarmText).HasMaxLength(128);
- entity.Property(e => e.AlarmValue).HasColumnType("sql_variant");
- entity.Property(e => e.ConditionId).HasColumnName("ConditionID");
- entity.Property(e => e.Source).HasMaxLength(50);
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ActiveTime);
-
- entity.ToTable("Log_Event");
-
- entity.Property(e => e.ActiveTime).HasColumnType("datetime");
- entity.Property(e => e.Comment).HasMaxLength(50);
- entity.Property(e => e.IsAcked).HasDefaultValueSql("((0))");
- entity.Property(e => e.Source).HasMaxLength(50);
- entity.Property(e => e.Sqlcounter)
- .ValueGeneratedOnAdd()
- .HasColumnName("SQLCounter");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("Log_HData");
-
- entity.Property(e => e.Id)
- .ValueGeneratedNever()
- .HasColumnName("ID");
- entity.Property(e => e.TimeStamp).HasColumnType("datetime");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("Membership");
-
- entity.Property(e => e.Id).HasColumnName("ID");
- entity.Property(e => e.Email)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Password).HasMaxLength(50);
- entity.Property(e => e.Phone)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.UserName).HasMaxLength(50);
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.TypeId);
-
- entity.ToTable("Meta_Condition");
-
- entity.Property(e => e.TypeId).HasColumnName("TypeID");
- entity.Property(e => e.Comment).HasMaxLength(50);
- entity.Property(e => e.IsEnabled)
- .IsRequired()
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.Source).HasMaxLength(50);
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.DriverId);
-
- entity.ToTable("Meta_Driver");
-
- entity.Property(e => e.DriverId)
- .ValueGeneratedNever()
- .HasColumnName("DriverID");
- entity.Property(e => e.DriverName)
- .HasMaxLength(64)
- .HasDefaultValueSql("('')");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.GroupId);
-
- entity.ToTable("Meta_Group");
-
- entity.Property(e => e.GroupId)
- .ValueGeneratedNever()
- .HasColumnName("GroupID");
- entity.Property(e => e.DriverId).HasColumnName("DriverID");
- entity.Property(e => e.GroupName).HasMaxLength(20);
- entity.Property(e => e.IsActive)
- .IsRequired()
- .HasDefaultValueSql("((1))");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ScaleId);
-
- entity.ToTable("Meta_Scale");
-
- entity.Property(e => e.ScaleId)
- .ValueGeneratedNever()
- .HasColumnName("ScaleID");
- entity.Property(e => e.Euhi).HasColumnName("EUHi");
- entity.Property(e => e.Eulo).HasColumnName("EULo");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.ConditionId);
-
- entity.ToTable("Meta_SubCondition");
-
- entity.Property(e => e.ConditionId)
- .ValueGeneratedNever()
- .HasColumnName("ConditionID");
- entity.Property(e => e.IsEnable)
- .IsRequired()
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.Message)
- .HasMaxLength(250)
- .HasDefaultValueSql("('')");
-
- entity.HasOne(d => d.Condition).WithOne(p => p.MetaSubCondition)
- .HasForeignKey(d => d.ConditionId)
- .HasConstraintName("FK_Meta_SubCondition_Meta_Condition");
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.TagId);
-
- entity.ToTable("Meta_Tag");
-
- entity.Property(e => e.TagId).HasColumnName("TagID");
- entity.Property(e => e.Address)
- .HasMaxLength(64)
- .IsUnicode(false);
- entity.Property(e => e.DefaultValue).HasColumnType("sql_variant");
- entity.Property(e => e.Description).HasMaxLength(128);
- entity.Property(e => e.GroupId).HasColumnName("GroupID");
- entity.Property(e => e.IsActive)
- .IsRequired()
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.TagName).HasMaxLength(512);
- entity.Property(e => e.Subsystem)
- .IsRequired()
- .HasMaxLength(64)
- .HasDefaultValueSql("('None')");
- entity.Property(e => e.Units)
- .IsRequired()
- .HasMaxLength(20)
- .HasDefaultValueSql("('N')");
- entity.Property(e => e.WriteAddress).HasMaxLength(64);
- entity.Property(e => e.SysType).HasMaxLength(32);
- });
-
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.DriverId);
-
- entity.ToTable("RegisterModule");
-
- entity.Property(e => e.DriverId).HasColumnName("DriverID");
- entity.Property(e => e.AssemblyName).HasMaxLength(255);
- entity.Property(e => e.ClassFullName)
- .HasMaxLength(128)
- .IsUnicode(false);
- entity.Property(e => e.ClassName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Description).HasMaxLength(50);
- });
-
- OnModelCreatingPartial(modelBuilder);
- }
-
- partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
-}