临时提交2

This commit is contained in:
2025-07-21 18:49:49 +08:00
parent 29a2d44319
commit 525c681b6c
57 changed files with 628 additions and 558 deletions

View File

@@ -1,10 +0,0 @@
using System.Threading.Tasks;
namespace DMS.Infrastructure.Interfaces
{
public interface IDatabaseService
{
void InitializeDataBase();
Task InitializeMenu();
}
}

View File

@@ -1,20 +0,0 @@
using DMS.Core.Models;
using SqlSugar;
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{
public interface IDeviceRepository
{
Task<DbDevice> AddAsync(DbDevice model);
Task<int> UpdateAsync(DbDevice model);
Task<int> DeleteAsync(DbDevice model);
Task<List<DbDevice>> GetAllAsync();
Task<DbDevice> GetByIdAsync(int id);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}

View File

@@ -1,12 +0,0 @@
using DMS.Core.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace DMS.Infrastructure.Interfaces
{
public interface IDeviceService
{
Task<Device> AddAsync(Device device);
Task<List<Device>> GetAllAsync();
}
}

View File

@@ -1,19 +0,0 @@
using DMS.Core.Models;
using DMS.Core.Enums;
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{
public interface IMenuRepository
{
Task<int> DeleteAsync(DbMenu menu);
Task<List<DbMenu>> GetMenuTreesAsync();
Task<DbMenu> AddAsync(DbMenu menu);
Task<int> UpdateAsync(DbMenu menu);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}

View File

@@ -1,20 +0,0 @@
using DMS.Core.Models;
using DMS.Infrastructure.Entities;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace DMS.Infrastructure.Interfaces
{
public interface IMqttRepository
{
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,18 +0,0 @@
using DMS.Core.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace DMS.Infrastructure.Interfaces
{
public interface IUserRepository
{
Task<User> GetByIdAsync(int id);
Task<List<User>> GetAllAsync();
Task<int> AddAsync(User user);
Task<int> UpdateAsync(User user);
Task<int> DeleteAsync(int id);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}

View File

@@ -1,18 +0,0 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Core.Models;
namespace DMS.Infrastructure.Interfaces
{
public interface IVarDataRepository
{
Task<Variable> GetByIdAsync(int id);
Task<List<Variable>> GetAllAsync();
Task<Variable> AddAsync(Variable variable);
Task<int> UpdateAsync(Variable variable);
Task<int> DeleteAsync(Variable variable);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}

View File

@@ -1,20 +0,0 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Core.Models;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{
public interface IVarTableRepository
{
Task<DbVariableTable> AddAsync(DbVariableTable varTable);
Task<int> UpdateAsync(DbVariableTable variableTable);
Task<int> DeleteAsync(DbVariableTable variableTable);
Task<List<DbVariableTable>> GetAllAsync();
Task<DbVariableTable> GetByIdAsync(int id);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}

View File

@@ -1,18 +0,0 @@
using DMS.Core.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{
public interface IVariableMqttAliasRepository
{
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();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}