按照软件设计文档开始重构代码01

This commit is contained in:
2025-07-21 14:35:17 +08:00
parent a7b0a5d108
commit 29a2d44319
127 changed files with 12265 additions and 1586 deletions

View File

@@ -2,6 +2,7 @@ using DMS.Core.Models;
using SqlSugar;
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{

View File

@@ -7,13 +7,14 @@ namespace DMS.Infrastructure.Interfaces
{
public interface IMqttRepository
{
Task<DbMqtt> GetByIdAsync(int id);
Task<List<DbMqtt>> GetAllAsync();
Task<int> AddAsync(DbMqtt mqtt);
Task<int> UpdateAsync(DbMqtt mqtt);
Task<int> DeleteAsync(DbMqtt mqtt);
Task<DbMqttServer> GetByIdAsync(int id);
Task<List<DbMqttServer>> GetAllAsync();
Task<int> AddAsync(DbMqttServer mqtt);
Task<int> UpdateAsync(DbMqttServer mqtt);
Task<int> DeleteAsync(DbMqttServer mqtt);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}

View File

@@ -1,12 +1,13 @@
using DMS.Core.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{
public interface IVariableMqttAliasRepository
{
Task<VariableMqtt?> GetByIdAsync(int variableDataId, int mqttId);
Task<DbVariableMqttAlias?> GetByIdAsync(int variableDataId, int mqttId);
Task<int> UpdateAliasAsync(int variableDataId, int mqttId, string newAlias);
Task<int> DeleteAsync(int variableDataId, int mqttId);
Task BeginTranAsync();