完成DbDevice的数据库操作

This commit is contained in:
2025-06-10 22:13:06 +08:00
parent b118e8ec90
commit bcfa3df3d3
10 changed files with 103 additions and 33 deletions

11
Data/Entities/DbDevice.cs Normal file
View File

@@ -0,0 +1,11 @@
namespace PMSWPF.Data.Entities;
public class DbDevice
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public bool IsRuning { get; set; }
}

View File

@@ -4,7 +4,7 @@ using SqlSugar.DbConvert;
namespace PMSWPF.Data.Entities
{
public class PLC
public class DbPLC
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
public int id { get; set; }
@@ -47,11 +47,11 @@ namespace PMSWPF.Data.Entities
/// </summary>
public bool IsEnable { get; set; }
public PLC()
public DbPLC()
{
}
public PLC(string name = "", string nodeID = "", string ip = "", string status = "", string connType = "")
public DbPLC(string name = "", string nodeID = "", string ip = "", string status = "", string connType = "")
{
this.Name = name;
this.NodeID = nodeID;