diff --git a/projects/Application/.gitignore b/projects/Application/.gitignore
new file mode 100644
index 00000000..cd5894bd
--- /dev/null
+++ b/projects/Application/.gitignore
@@ -0,0 +1,18 @@
+*.bak
+*.suo
+*.db
+*.db-shm
+*.db-wal
+*.user
+.vs
+obj
+Obj
+bin
+Bin
+debug
+Debug
+release
+Release
+Logs
+logs
+node_modules
\ No newline at end of file
diff --git a/projects/Application/Application.csproj b/projects/Application/Application.csproj
new file mode 100644
index 00000000..123e903a
--- /dev/null
+++ b/projects/Application/Application.csproj
@@ -0,0 +1,12 @@
+
+
+
+ net5.0
+
+
+
+
+
+
+
+
diff --git a/projects/Infrastructure/Domain/ManyToManyAttribute.cs b/projects/Infrastructure/Domain/ManyToManyAttribute.cs
new file mode 100644
index 00000000..246cbb6a
--- /dev/null
+++ b/projects/Infrastructure/Domain/ManyToManyAttribute.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Infrastructure.Domain
+{
+ ///
+ /// 关联实体,只有新建和删除操作,无修改操作
+ ///
+ [AttributeUsage(AttributeTargets.Class)]
+ public class ManyToManyAttribute : Attribute
+ {
+ }
+}
diff --git a/projects/IoTNode/Application/Domain/Entities/RolePermission.cs b/projects/IoTNode/Application/Domain/Entities/RolePermission.cs
index 689a6759..1796f3e0 100644
--- a/projects/IoTNode/Application/Domain/Entities/RolePermission.cs
+++ b/projects/IoTNode/Application/Domain/Entities/RolePermission.cs
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations;
namespace Application.Domain.Entities
{
[Display(Name = "角色权限")]
+ [ManyToMany]
public class RolePermission : BaseEntity
{
public Guid RoleId { get; set; }
diff --git a/projects/IoTNode/Application/Domain/Entities/UserRole.cs b/projects/IoTNode/Application/Domain/Entities/UserRole.cs
index a38d123c..fedb04e8 100644
--- a/projects/IoTNode/Application/Domain/Entities/UserRole.cs
+++ b/projects/IoTNode/Application/Domain/Entities/UserRole.cs
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations;
namespace Application.Domain.Entities
{
[Display(Name = "用户角色")]
+ [ManyToMany]
public class UserRole : BaseEntity
{
public Guid UserId { get; set; }
diff --git a/projects/projects.sln b/projects/projects.sln
index 47db2295..3a557ad8 100644
--- a/projects/projects.sln
+++ b/projects/projects.sln
@@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebSPA", "WebSPA\WebSPA.csp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTDameon", "IoTDameon\IoTDameon.csproj", "{60596088-3C4E-4EA2-933A-B66CD269845B}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{9AEB7CA3-CB61-40D2-8009-1BA93842FE69}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -121,12 +123,24 @@ Global
{60596088-3C4E-4EA2-933A-B66CD269845B}.Release|iPhone.Build.0 = Release|Any CPU
{60596088-3C4E-4EA2-933A-B66CD269845B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{60596088-3C4E-4EA2-933A-B66CD269845B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Release|iPhone.Build.0 = Release|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {9AEB7CA3-CB61-40D2-8009-1BA93842FE69}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {0B7095FB-5E70-4EF8-805A-CB4A91AE4B0A}
BuildVersion_StartDate = 2000/1/1
+ SolutionGuid = {0B7095FB-5E70-4EF8-805A-CB4A91AE4B0A}
EndGlobalSection
EndGlobal