From f3faef7a0daa2db36c98295f4d4c377e2a69bae0 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Mon, 4 Dec 2023 09:30:41 +0330 Subject: [PATCH 1/3] update packages --- .../AuthenticationsGeneratedServices/ConnectedService.json | 4 ++-- ...yMicroservices.AuthenticationsMicroservice.Database.csproj | 2 +- ...asyMicroservices.AuthenticationsMicroservice.Domain.csproj | 2 +- .../DatabaseBuilder.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json index e2877ec..6d009e1 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json @@ -61,10 +61,10 @@ "ResponseClass": "SwaggerResponse", "Namespace": "Authentications.GeneratedServices", "RequiredPropertiesMustBeDefined": true, - "DateType": "System.DateTimeOffset", + "DateType": "System.DateTime", "JsonConverters": [], "AnyType": "object", - "DateTimeType": "System.DateTimeOffset", + "DateTimeType": "System.DateTime", "TimeType": "System.TimeSpan", "TimeSpanType": "System.TimeSpan", "ArrayType": "System.Collections.Generic.ICollection", diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj index 0f33493..e4b3db9 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj index b37bc68..3303f04 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs index 307e8ee..1df34f5 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs @@ -14,8 +14,8 @@ public DatabaseBuilder(IConfiguration configuration) public void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - optionsBuilder.UseInMemoryDatabase("AuthDb"); - //optionsBuilder.UseSqlServer(_configuration.GetConnectionString("local")); + //optionsBuilder.UseInMemoryDatabase("AuthDb"); + optionsBuilder.UseSqlServer(_configuration.GetConnectionString("local")); } } } From fccb850ffa00bc9a9207eb6a2484275b6f296190 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Mon, 25 Dec 2023 10:33:26 +0330 Subject: [PATCH 2/3] add support for unique identity --- .../OpenAPI.cs | 330 ++++++++--- .../OpenAPI.nswag | 4 +- .../OpenAPI.nswag.json | 178 +++--- ...AuthenticationsMicroservice.Clients.csproj | 2 +- ...2301_SyncDatabaseForProduction.Designer.cs | 79 --- ...0230831142301_SyncDatabaseForProduction.cs | 73 --- ...7164110_Add_VerifyEmailAddress.Designer.cs | 82 --- .../20231007164110_Add_VerifyEmailAddress.cs | 29 - ...2045739_AddRefactorNewEntities.Designer.cs | 349 ----------- .../20231012045739_AddRefactorNewEntities.cs | 314 ---------- ...ix_UniqueIdentityCaseSensitive.Designer.cs | 354 ----------- ...5152929_Fix_UniqueIdentityCaseSensitive.cs | 118 ---- ...4145000_AddRoleParentChild_SomeSeedData.cs | 360 ------------ ...0231204060829_FirstInitialize.Designer.cs} | 240 ++++++-- .../20231204060829_FirstInitialize.cs | 548 ++++++++++++++++++ .../AuthenticationsContextModelSnapshot.cs | 236 ++++++-- .../SeedData/AllSeedData.cs | 40 +- .../Contracts/Common/UserSummaryContract.cs | 6 +- ...GetByIdAndUniqueIdentityRequestContract.cs | 8 + .../GetUserByUserNameRequestContract.cs | 11 +- .../ServicePermissionRequestContract.cs | 7 +- ....AuthenticationsMicroservice.Domain.csproj | 3 +- ....AuthenticationsMicroservice.Logics.csproj | 2 +- .../DatabaseBuilder.cs | 16 +- .../Controllers/RoleController.cs | 6 +- .../ServicePermissionController.cs | 4 +- .../Controllers/UserController.cs | 10 +- .../Program.cs | 39 +- .../appsettings.json | 23 +- 29 files changed, 1354 insertions(+), 2117 deletions(-) delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.Designer.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.Designer.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.Designer.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.Designer.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.cs delete mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.cs rename src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/{20231104145000_AddRoleParentChild_SomeSeedData.Designer.cs => 20231204060829_FirstInitialize.Designer.cs} (68%) create mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.cs create mode 100644 src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetByIdAndUniqueIdentityRequestContract.cs diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs index a72a8ec..93bebde 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs @@ -835,7 +835,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { return GetByIdAsync(body, System.Threading.CancellationToken.None); } @@ -843,7 +843,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/PersonalAccessToken/GetById"); @@ -913,7 +913,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -921,7 +921,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/PersonalAccessToken/GetByUniqueIdentity"); @@ -1143,7 +1143,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -1151,7 +1151,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/PersonalAccessToken/GetAllByUniqueIdentity"); @@ -1359,7 +1359,7 @@ public string BaseUrl /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetRolesByUserIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetRolesByUserIdAsync(GetByIdAndUniqueIdentityRequestContract body) { return GetRolesByUserIdAsync(body, System.Threading.CancellationToken.None); } @@ -1367,7 +1367,7 @@ public virtual System.Threading.Tasks.Task GetR /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetRolesByUserIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetRolesByUserIdAsync(GetByIdAndUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetRolesByUserId"); @@ -2217,7 +2217,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { return GetByIdAsync(body, System.Threading.CancellationToken.None); } @@ -2225,7 +2225,7 @@ public virtual System.Threading.Tasks.Task GetByIdA /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetById"); @@ -2295,7 +2295,7 @@ public virtual async System.Threading.Tasks.Task Ge /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -2303,7 +2303,7 @@ public virtual System.Threading.Tasks.Task GetByUni /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetByUniqueIdentity"); @@ -2525,7 +2525,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -2533,7 +2533,7 @@ public virtual System.Threading.Tasks.Task GetA /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetAllByUniqueIdentity"); @@ -3521,7 +3521,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { return GetByIdAsync(body, System.Threading.CancellationToken.None); } @@ -3529,7 +3529,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetById"); @@ -3599,7 +3599,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -3607,7 +3607,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetByUniqueIdentity"); @@ -3829,7 +3829,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -3837,7 +3837,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetAllByUniqueIdentity"); @@ -4903,7 +4903,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { return GetByIdAsync(body, System.Threading.CancellationToken.None); } @@ -4911,7 +4911,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetById"); @@ -4981,7 +4981,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -4989,7 +4989,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetByUniqueIdentity"); @@ -5211,7 +5211,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -5219,7 +5219,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetAllByUniqueIdentity"); @@ -6441,7 +6441,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { return GetByIdAsync(body, System.Threading.CancellationToken.None); } @@ -6449,7 +6449,7 @@ public virtual System.Threading.Tasks.Task GetByIdA /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetById"); @@ -6519,7 +6519,7 @@ public virtual async System.Threading.Tasks.Task Ge /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -6527,7 +6527,7 @@ public virtual System.Threading.Tasks.Task GetByUni /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetByUniqueIdentity"); @@ -6749,7 +6749,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -6757,7 +6757,7 @@ public virtual System.Threading.Tasks.Task GetA /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetAllByUniqueIdentity"); @@ -7745,7 +7745,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { return GetByIdAsync(body, System.Threading.CancellationToken.None); } @@ -7753,7 +7753,7 @@ public virtual System.Threading.Tasks.Task GetB /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/GetById"); @@ -7823,7 +7823,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -7831,7 +7831,7 @@ public virtual System.Threading.Tasks.Task GetB /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/GetByUniqueIdentity"); @@ -8053,7 +8053,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -8061,7 +8061,7 @@ public virtual System.Threading.Tasks.Task /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/GetAllByUniqueIdentity"); @@ -8928,20 +8928,19 @@ public enum FailedReasonType public partial class FilterRequestContract : System.ComponentModel.INotifyPropertyChanged { private bool? _isDeleted; - private System.DateTimeOffset? _fromDeletedDateTime; - private System.DateTimeOffset? _toDeletedDateTime; - private System.DateTimeOffset? _fromCreationDateTime; - private System.DateTimeOffset? _toCreationDateTime; - private System.DateTimeOffset? _fromModificationDateTime; - private System.DateTimeOffset? _toModificationDateTime; + private System.DateTime? _fromDeletedDateTime; + private System.DateTime? _toDeletedDateTime; + private System.DateTime? _fromCreationDateTime; + private System.DateTime? _toCreationDateTime; + private System.DateTime? _fromModificationDateTime; + private System.DateTime? _toModificationDateTime; private string _uniqueIdentity; private GetUniqueIdentityType _uniqueIdentityType; private long? _index; private long? _length; - private string _sortColumnNames; - private bool _isDescending; + private System.Collections.Generic.ICollection _sortColumnNames; private string _text; - private string _language; + private string _languageShortName; [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? IsDeleted @@ -8959,7 +8958,7 @@ public bool? IsDeleted } [Newtonsoft.Json.JsonProperty("fromDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FromDeletedDateTime + public System.DateTime? FromDeletedDateTime { get { return _fromDeletedDateTime; } @@ -8974,7 +8973,7 @@ public System.DateTimeOffset? FromDeletedDateTime } [Newtonsoft.Json.JsonProperty("toDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ToDeletedDateTime + public System.DateTime? ToDeletedDateTime { get { return _toDeletedDateTime; } @@ -8989,7 +8988,7 @@ public System.DateTimeOffset? ToDeletedDateTime } [Newtonsoft.Json.JsonProperty("fromCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FromCreationDateTime + public System.DateTime? FromCreationDateTime { get { return _fromCreationDateTime; } @@ -9004,7 +9003,7 @@ public System.DateTimeOffset? FromCreationDateTime } [Newtonsoft.Json.JsonProperty("toCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ToCreationDateTime + public System.DateTime? ToCreationDateTime { get { return _toCreationDateTime; } @@ -9019,7 +9018,7 @@ public System.DateTimeOffset? ToCreationDateTime } [Newtonsoft.Json.JsonProperty("fromModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FromModificationDateTime + public System.DateTime? FromModificationDateTime { get { return _fromModificationDateTime; } @@ -9034,7 +9033,7 @@ public System.DateTimeOffset? FromModificationDateTime } [Newtonsoft.Json.JsonProperty("toModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ToModificationDateTime + public System.DateTime? ToModificationDateTime { get { return _toModificationDateTime; } @@ -9109,7 +9108,7 @@ public long? Length } [Newtonsoft.Json.JsonProperty("sortColumnNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SortColumnNames + public System.Collections.Generic.ICollection SortColumnNames { get { return _sortColumnNames; } @@ -9123,46 +9122,77 @@ public string SortColumnNames } } - [Newtonsoft.Json.JsonProperty("isDescending", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDescending + [Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Text { - get { return _isDescending; } + get { return _text; } set { - if (_isDescending != value) + if (_text != value) { - _isDescending = value; + _text = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Text + [Newtonsoft.Json.JsonProperty("languageShortName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LanguageShortName { - get { return _text; } + get { return _languageShortName; } set { - if (_text != value) + if (_languageShortName != value) { - _text = value; + _languageShortName = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class GetByIdAndUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Language + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _language; } + get { return _uniqueIdentity; } set { - if (_language != value) + if (_uniqueIdentity != value) { - _language = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } @@ -9179,7 +9209,7 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class GetByUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged { private string _uniqueIdentity; private GetUniqueIdentityType _type; @@ -9249,18 +9279,34 @@ public enum GetUniqueIdentityType [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class GetUserByUserNameRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _username; + private string _userName; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UserName + { + get { return _userName; } + + set + { + if (_userName != value) + { + _userName = value; + RaisePropertyChanged(); + } + } + } - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _username; } + get { return _uniqueIdentity; } set { - if (_username != value) + if (_uniqueIdentity != value) { - _username = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } @@ -9337,7 +9383,7 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64GetIdRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64GetByIdRequestContract : System.ComponentModel.INotifyPropertyChanged { private long _id; @@ -9601,16 +9647,16 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class PersonalAccessTokenContract : System.ComponentModel.INotifyPropertyChanged { - private System.DateTimeOffset _creationDateTime; - private System.DateTimeOffset? _modificationDateTime; + private System.DateTime _creationDateTime; + private System.DateTime? _modificationDateTime; private bool _isDeleted; - private System.DateTimeOffset? _deletedDateTime; + private System.DateTime? _deletedDateTime; private string _uniqueIdentity; private long _id; private string _value; [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset CreationDateTime + public System.DateTime CreationDateTime { get { return _creationDateTime; } @@ -9625,7 +9671,7 @@ public System.DateTimeOffset CreationDateTime } [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ModificationDateTime + public System.DateTime? ModificationDateTime { get { return _modificationDateTime; } @@ -9655,7 +9701,7 @@ public bool IsDeleted } [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DeletedDateTime + public System.DateTime? DeletedDateTime { get { return _deletedDateTime; } @@ -9975,17 +10021,17 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class RoleContract : System.ComponentModel.INotifyPropertyChanged { - private System.DateTimeOffset _creationDateTime; - private System.DateTimeOffset? _modificationDateTime; + private System.DateTime _creationDateTime; + private System.DateTime? _modificationDateTime; private bool _isDeleted; - private System.DateTimeOffset? _deletedDateTime; + private System.DateTime? _deletedDateTime; private string _uniqueIdentity; private long _id; private string _name; private long? _parentId; [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset CreationDateTime + public System.DateTime CreationDateTime { get { return _creationDateTime; } @@ -10000,7 +10046,7 @@ public System.DateTimeOffset CreationDateTime } [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ModificationDateTime + public System.DateTime? ModificationDateTime { get { return _modificationDateTime; } @@ -10030,7 +10076,7 @@ public bool IsDeleted } [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DeletedDateTime + public System.DateTime? DeletedDateTime { get { return _deletedDateTime; } @@ -10975,6 +11021,7 @@ public partial class ServicePermissionRequestContract : System.ComponentModel.IN { private string _roleName; private string _microserviceName; + private string _uniqueIdentity; [Newtonsoft.Json.JsonProperty("roleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RoleName @@ -11006,6 +11053,83 @@ public string MicroserviceName } } + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class SortColumnStrategyContract : System.ComponentModel.INotifyPropertyChanged + { + private string _columnName; + private bool? _isDescending; + private int _index; + + [Newtonsoft.Json.JsonProperty("columnName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ColumnName + { + get { return _columnName; } + + set + { + if (_columnName != value) + { + _columnName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("isDescending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsDescending + { + get { return _isDescending; } + + set + { + if (_isDescending != value) + { + _isDescending = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Index + { + get { return _index; } + + set + { + if (_index != value) + { + _index = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -11053,10 +11177,10 @@ public partial class UserContract : System.ComponentModel.INotifyPropertyChanged private string _userName; private string _password; private string _uniqueIdentity; - private System.DateTimeOffset _creationDateTime; - private System.DateTimeOffset? _modificationDateTime; + private System.DateTime _creationDateTime; + private System.DateTime? _modificationDateTime; private bool _isDeleted; - private System.DateTimeOffset? _deletedDateTime; + private System.DateTime? _deletedDateTime; private bool _isUsernameVerified; [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -11120,7 +11244,7 @@ public string UniqueIdentity } [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset CreationDateTime + public System.DateTime CreationDateTime { get { return _creationDateTime; } @@ -11135,7 +11259,7 @@ public System.DateTimeOffset CreationDateTime } [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ModificationDateTime + public System.DateTime? ModificationDateTime { get { return _modificationDateTime; } @@ -11165,7 +11289,7 @@ public bool IsDeleted } [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DeletedDateTime + public System.DateTime? DeletedDateTime { get { return _deletedDateTime; } @@ -11691,6 +11815,7 @@ public partial class UserSummaryContract : System.ComponentModel.INotifyProperty { private string _userName; private string _password; + private string _uniqueIdentity; [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string UserName @@ -11722,6 +11847,21 @@ public string Password } } + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag index 573a782..e5be6c5 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag @@ -57,10 +57,10 @@ "responseClass": "SwaggerResponse", "namespace": "Authentications.GeneratedServices", "requiredPropertiesMustBeDefined": true, - "dateType": "System.DateTimeOffset", + "dateType": "System.DateTime", "jsonConverters": [], "anyType": "object", - "dateTimeType": "System.DateTimeOffset", + "dateTimeType": "System.DateTime", "timeType": "System.TimeSpan", "timeSpanType": "System.TimeSpan", "arrayType": "System.Collections.Generic.ICollection", diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json index 49b325a..4b060d4 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json @@ -505,17 +505,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } } } @@ -554,17 +554,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -682,17 +682,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -731,17 +731,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/GetByIdAndUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/GetByIdAndUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/GetByIdAndUniqueIdentityRequestContract" } } } @@ -1270,17 +1270,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } } } @@ -1319,17 +1319,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -1447,17 +1447,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -1986,17 +1986,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } } } @@ -2035,17 +2035,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -2163,17 +2163,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -2751,17 +2751,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } } } @@ -2800,17 +2800,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -2928,17 +2928,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -3614,17 +3614,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } } } @@ -3663,17 +3663,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -3791,17 +3791,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -4330,17 +4330,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64GetByIdRequestContract" } } } @@ -4379,17 +4379,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -4507,17 +4507,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/GetByUniqueIdentityRequestContract" } } } @@ -4911,23 +4911,38 @@ "nullable": true }, "sortColumnNames": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/SortColumnStrategyContract" + } + }, + "text": { "type": "string", "nullable": true }, - "isDescending": { - "type": "boolean" - }, - "text": { + "languageShortName": { "type": "string", "nullable": true + } + } + }, + "GetByIdAndUniqueIdentityRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" }, - "language": { + "uniqueIdentity": { "type": "string", "nullable": true } } }, - "GetUniqueIdentityRequestContract": { + "GetByUniqueIdentityRequestContract": { "type": "object", "additionalProperties": false, "properties": { @@ -4968,7 +4983,11 @@ "type": "object", "additionalProperties": false, "properties": { - "username": { + "userName": { + "type": "string", + "nullable": true + }, + "uniqueIdentity": { "type": "string", "nullable": true } @@ -5001,8 +5020,8 @@ } } }, - "Int64GetIdRequestContract": { - "title": "GetIdRequestContract", + "Int64GetByIdRequestContract": { + "title": "GetByIdRequestContract", "type": "object", "additionalProperties": false, "properties": { @@ -5502,6 +5521,29 @@ "microserviceName": { "type": "string", "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "SortColumnStrategyContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "columnName": { + "type": "string", + "nullable": true + }, + "isDescending": { + "title": "Nullable", + "type": "boolean", + "nullable": true + }, + "index": { + "type": "integer", + "format": "int32" } } }, @@ -5716,6 +5758,10 @@ "password": { "type": "string", "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true } } }, diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj index fb9ee68..b736271 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.16 + 0.0.0.17 client generated code. EasyMicroservices@gmail.com microservice,auth,authentication,client diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.Designer.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.Designer.cs deleted file mode 100644 index 0a09777..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.Designer.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -using System; -using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - [DbContext(typeof(AuthenticationsContext))] - [Migration("20230831142301_SyncDatabaseForProduction")] - partial class SyncDatabaseForProduction - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("Password") - .HasColumnType("nvarchar(max)"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.Property("UserName") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("UserName") - .IsUnique() - .HasFilter("[UserName] IS NOT NULL"); - - b.ToTable("Users"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.cs deleted file mode 100644 index 889572e..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20230831142301_SyncDatabaseForProduction.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - /// - public partial class SyncDatabaseForProduction : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserName = table.Column(type: "nvarchar(450)", nullable: true), - Password = table.Column(type: "nvarchar(max)", nullable: true), - UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), - CreationDateTime = table.Column(type: "datetime2", nullable: false), - ModificationDateTime = table.Column(type: "datetime2", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeletedDateTime = table.Column(type: "datetime2", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_Users_CreationDateTime", - table: "Users", - column: "CreationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_Users_DeletedDateTime", - table: "Users", - column: "DeletedDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_Users_IsDeleted", - table: "Users", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_Users_ModificationDateTime", - table: "Users", - column: "ModificationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_Users_UniqueIdentity", - table: "Users", - column: "UniqueIdentity"); - - migrationBuilder.CreateIndex( - name: "IX_Users_UserName", - table: "Users", - column: "UserName", - unique: true, - filter: "[UserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.Designer.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.Designer.cs deleted file mode 100644 index 9d1a0a8..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.Designer.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -using System; -using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - [DbContext(typeof(AuthenticationsContext))] - [Migration("20231007164110_Add_VerifyEmailAddress")] - partial class Add_VerifyEmailAddress - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsUsernameVerified") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("Password") - .HasColumnType("nvarchar(max)"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.Property("UserName") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("UserName") - .IsUnique() - .HasFilter("[UserName] IS NOT NULL"); - - b.ToTable("Users"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.cs deleted file mode 100644 index d8a14c7..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231007164110_Add_VerifyEmailAddress.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - /// - public partial class Add_VerifyEmailAddress : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "IsUsernameVerified", - table: "Users", - type: "bit", - nullable: false, - defaultValue: false); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsUsernameVerified", - table: "Users"); - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.Designer.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.Designer.cs deleted file mode 100644 index 34b906f..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.Designer.cs +++ /dev/null @@ -1,349 +0,0 @@ -// -using System; -using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - [DbContext(typeof(AuthenticationsContext))] - [Migration("20231012045739_AddRefactorNewEntities")] - partial class AddRefactorNewEntities - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.12") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("ParentId"); - - b.HasIndex("UniqueIdentity"); - - b.ToTable("Roles"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleServicePermissionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("RoleId") - .HasColumnType("bigint"); - - b.Property("ServicePermissionId") - .HasColumnType("bigint"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("RoleId"); - - b.HasIndex("ServicePermissionId"); - - b.HasIndex("UniqueIdentity"); - - b.ToTable("RoleServicePermissions"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.ServicePermissionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("MethodName") - .HasColumnType("nvarchar(450)"); - - b.Property("MicroserviceName") - .HasColumnType("nvarchar(450)"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("ServiceName") - .HasColumnType("nvarchar(450)"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("MethodName"); - - b.HasIndex("MicroserviceName"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("ServiceName"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("MicroserviceName", "ServiceName", "MethodName") - .IsUnique() - .HasFilter("[MicroserviceName] IS NOT NULL AND [ServiceName] IS NOT NULL AND [MethodName] IS NOT NULL"); - - b.ToTable("ServicePermissions"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsUsernameVerified") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("Password") - .HasColumnType("nvarchar(max)"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)"); - - b.Property("UserName") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("Id") - .IsUnique(); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("UserName") - .IsUnique() - .HasFilter("[UserName] IS NOT NULL"); - - b.ToTable("Users"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserRoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("RoleId") - .HasColumnType("bigint"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("RoleId"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("UserId"); - - b.ToTable("UserRoles"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => - { - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleServicePermissionEntity", b => - { - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", "Role") - .WithMany("RoleServicePermissions") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.ServicePermissionEntity", "ServicePermission") - .WithMany("RoleServicePermissions") - .HasForeignKey("ServicePermissionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Role"); - - b.Navigation("ServicePermission"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserRoleEntity", b => - { - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Role"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => - { - b.Navigation("Children"); - - b.Navigation("RoleServicePermissions"); - - b.Navigation("UserRoles"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.ServicePermissionEntity", b => - { - b.Navigation("RoleServicePermissions"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => - { - b.Navigation("UserRoles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.cs deleted file mode 100644 index 2a38ab1..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231012045739_AddRefactorNewEntities.cs +++ /dev/null @@ -1,314 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - /// - public partial class AddRefactorNewEntities : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "Users", - type: "nvarchar(450)", - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true, - oldCollation: "SQL_Latin1_General_CP1_CS_AS"); - - migrationBuilder.CreateTable( - name: "Roles", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - ParentId = table.Column(type: "bigint", nullable: true), - CreationDateTime = table.Column(type: "datetime2", nullable: false), - ModificationDateTime = table.Column(type: "datetime2", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeletedDateTime = table.Column(type: "datetime2", nullable: true), - UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true), - Name = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Roles", x => x.Id); - table.ForeignKey( - name: "FK_Roles_Roles_ParentId", - column: x => x.ParentId, - principalTable: "Roles", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "ServicePermissions", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - CreationDateTime = table.Column(type: "datetime2", nullable: false), - ModificationDateTime = table.Column(type: "datetime2", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeletedDateTime = table.Column(type: "datetime2", nullable: true), - UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true), - MicroserviceName = table.Column(type: "nvarchar(450)", nullable: true), - ServiceName = table.Column(type: "nvarchar(450)", nullable: true), - MethodName = table.Column(type: "nvarchar(450)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ServicePermissions", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "UserRoles", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "bigint", nullable: false), - UserId = table.Column(type: "bigint", nullable: false), - CreationDateTime = table.Column(type: "datetime2", nullable: false), - ModificationDateTime = table.Column(type: "datetime2", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeletedDateTime = table.Column(type: "datetime2", nullable: true), - UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserRoles", x => x.Id); - table.ForeignKey( - name: "FK_UserRoles_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserRoles_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "RoleServicePermissions", - columns: table => new - { - Id = table.Column(type: "bigint", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "bigint", nullable: false), - ServicePermissionId = table.Column(type: "bigint", nullable: false), - CreationDateTime = table.Column(type: "datetime2", nullable: false), - ModificationDateTime = table.Column(type: "datetime2", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false), - DeletedDateTime = table.Column(type: "datetime2", nullable: true), - UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RoleServicePermissions", x => x.Id); - table.ForeignKey( - name: "FK_RoleServicePermissions_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_RoleServicePermissions_ServicePermissions_ServicePermissionId", - column: x => x.ServicePermissionId, - principalTable: "ServicePermissions", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Users_Id", - table: "Users", - column: "Id", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Roles_CreationDateTime", - table: "Roles", - column: "CreationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_Roles_DeletedDateTime", - table: "Roles", - column: "DeletedDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_Roles_IsDeleted", - table: "Roles", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_Roles_ModificationDateTime", - table: "Roles", - column: "ModificationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_Roles_ParentId", - table: "Roles", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_Roles_UniqueIdentity", - table: "Roles", - column: "UniqueIdentity"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_CreationDateTime", - table: "RoleServicePermissions", - column: "CreationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_DeletedDateTime", - table: "RoleServicePermissions", - column: "DeletedDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_IsDeleted", - table: "RoleServicePermissions", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_ModificationDateTime", - table: "RoleServicePermissions", - column: "ModificationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_RoleId", - table: "RoleServicePermissions", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_ServicePermissionId", - table: "RoleServicePermissions", - column: "ServicePermissionId"); - - migrationBuilder.CreateIndex( - name: "IX_RoleServicePermissions_UniqueIdentity", - table: "RoleServicePermissions", - column: "UniqueIdentity"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_CreationDateTime", - table: "ServicePermissions", - column: "CreationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_DeletedDateTime", - table: "ServicePermissions", - column: "DeletedDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_IsDeleted", - table: "ServicePermissions", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_MethodName", - table: "ServicePermissions", - column: "MethodName"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_MicroserviceName", - table: "ServicePermissions", - column: "MicroserviceName"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_MicroserviceName_ServiceName_MethodName", - table: "ServicePermissions", - columns: new[] { "MicroserviceName", "ServiceName", "MethodName" }, - unique: true, - filter: "[MicroserviceName] IS NOT NULL AND [ServiceName] IS NOT NULL AND [MethodName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_ModificationDateTime", - table: "ServicePermissions", - column: "ModificationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_ServiceName", - table: "ServicePermissions", - column: "ServiceName"); - - migrationBuilder.CreateIndex( - name: "IX_ServicePermissions_UniqueIdentity", - table: "ServicePermissions", - column: "UniqueIdentity"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_CreationDateTime", - table: "UserRoles", - column: "CreationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_DeletedDateTime", - table: "UserRoles", - column: "DeletedDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_IsDeleted", - table: "UserRoles", - column: "IsDeleted"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_ModificationDateTime", - table: "UserRoles", - column: "ModificationDateTime"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_RoleId", - table: "UserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_UniqueIdentity", - table: "UserRoles", - column: "UniqueIdentity"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_UserId", - table: "UserRoles", - column: "UserId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RoleServicePermissions"); - - migrationBuilder.DropTable( - name: "UserRoles"); - - migrationBuilder.DropTable( - name: "ServicePermissions"); - - migrationBuilder.DropTable( - name: "Roles"); - - migrationBuilder.DropIndex( - name: "IX_Users_Id", - table: "Users"); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "Users", - type: "nvarchar(450)", - nullable: true, - collation: "SQL_Latin1_General_CP1_CS_AS", - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true); - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.Designer.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.Designer.cs deleted file mode 100644 index 71375d7..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.Designer.cs +++ /dev/null @@ -1,354 +0,0 @@ -// -using System; -using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - [DbContext(typeof(AuthenticationsContext))] - [Migration("20231025152929_Fix_UniqueIdentityCaseSensitive")] - partial class Fix_UniqueIdentityCaseSensitive - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.13") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("ParentId") - .HasColumnType("bigint"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("ParentId"); - - b.HasIndex("UniqueIdentity"); - - b.ToTable("Roles"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleServicePermissionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("RoleId") - .HasColumnType("bigint"); - - b.Property("ServicePermissionId") - .HasColumnType("bigint"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("RoleId"); - - b.HasIndex("ServicePermissionId"); - - b.HasIndex("UniqueIdentity"); - - b.ToTable("RoleServicePermissions"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.ServicePermissionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("MethodName") - .HasColumnType("nvarchar(450)"); - - b.Property("MicroserviceName") - .HasColumnType("nvarchar(450)"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("ServiceName") - .HasColumnType("nvarchar(450)"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("MethodName"); - - b.HasIndex("MicroserviceName"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("ServiceName"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("MicroserviceName", "ServiceName", "MethodName") - .IsUnique() - .HasFilter("[MicroserviceName] IS NOT NULL AND [ServiceName] IS NOT NULL AND [MethodName] IS NOT NULL"); - - b.ToTable("ServicePermissions"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("IsUsernameVerified") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("Password") - .HasColumnType("nvarchar(max)"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.Property("UserName") - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("Id") - .IsUnique(); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("UserName") - .IsUnique() - .HasFilter("[UserName] IS NOT NULL"); - - b.ToTable("Users"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserRoleEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("bigint"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("CreationDateTime") - .HasColumnType("datetime2"); - - b.Property("DeletedDateTime") - .HasColumnType("datetime2"); - - b.Property("IsDeleted") - .HasColumnType("bit"); - - b.Property("ModificationDateTime") - .HasColumnType("datetime2"); - - b.Property("RoleId") - .HasColumnType("bigint"); - - b.Property("UniqueIdentity") - .HasColumnType("nvarchar(450)") - .UseCollation("SQL_Latin1_General_CP1_CS_AS"); - - b.Property("UserId") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("CreationDateTime"); - - b.HasIndex("DeletedDateTime"); - - b.HasIndex("IsDeleted"); - - b.HasIndex("ModificationDateTime"); - - b.HasIndex("RoleId"); - - b.HasIndex("UniqueIdentity"); - - b.HasIndex("UserId"); - - b.ToTable("UserRoles"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => - { - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId"); - - b.Navigation("Parent"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleServicePermissionEntity", b => - { - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", "Role") - .WithMany("RoleServicePermissions") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.ServicePermissionEntity", "ServicePermission") - .WithMany("RoleServicePermissions") - .HasForeignKey("ServicePermissionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Role"); - - b.Navigation("ServicePermission"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserRoleEntity", b => - { - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", "Role") - .WithMany("UserRoles") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", "User") - .WithMany("UserRoles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Role"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => - { - b.Navigation("Children"); - - b.Navigation("RoleServicePermissions"); - - b.Navigation("UserRoles"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.ServicePermissionEntity", b => - { - b.Navigation("RoleServicePermissions"); - }); - - modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => - { - b.Navigation("UserRoles"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.cs deleted file mode 100644 index 0351c7c..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231025152929_Fix_UniqueIdentityCaseSensitive.cs +++ /dev/null @@ -1,118 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - /// - public partial class Fix_UniqueIdentityCaseSensitive : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "Users", - type: "nvarchar(450)", - nullable: true, - collation: "SQL_Latin1_General_CP1_CS_AS", - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "UserRoles", - type: "nvarchar(450)", - nullable: true, - collation: "SQL_Latin1_General_CP1_CS_AS", - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "ServicePermissions", - type: "nvarchar(450)", - nullable: true, - collation: "SQL_Latin1_General_CP1_CS_AS", - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "RoleServicePermissions", - type: "nvarchar(450)", - nullable: true, - collation: "SQL_Latin1_General_CP1_CS_AS", - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "Roles", - type: "nvarchar(450)", - nullable: true, - collation: "SQL_Latin1_General_CP1_CS_AS", - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "Users", - type: "nvarchar(450)", - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true, - oldCollation: "SQL_Latin1_General_CP1_CS_AS"); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "UserRoles", - type: "nvarchar(450)", - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true, - oldCollation: "SQL_Latin1_General_CP1_CS_AS"); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "ServicePermissions", - type: "nvarchar(450)", - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true, - oldCollation: "SQL_Latin1_General_CP1_CS_AS"); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "RoleServicePermissions", - type: "nvarchar(450)", - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true, - oldCollation: "SQL_Latin1_General_CP1_CS_AS"); - - migrationBuilder.AlterColumn( - name: "UniqueIdentity", - table: "Roles", - type: "nvarchar(450)", - nullable: true, - oldClrType: typeof(string), - oldType: "nvarchar(450)", - oldNullable: true, - oldCollation: "SQL_Latin1_General_CP1_CS_AS"); - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.cs deleted file mode 100644 index 895d47c..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.cs +++ /dev/null @@ -1,360 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional - -namespace EasyMicroservices.AuthenticationsMicroservice.Migrations -{ - /// - public partial class AddRoleParentChild_SomeSeedData : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Roles_Roles_ParentId", - table: "Roles"); - - migrationBuilder.DropIndex( - name: "IX_Roles_ParentId", - table: "Roles"); - - migrationBuilder.DropColumn( - name: "ParentId", - table: "Roles"); - - migrationBuilder.AddColumn( - name: "AccessType", - table: "ServicePermissions", - type: "tinyint", - nullable: false, - defaultValue: (byte)0); - - migrationBuilder.CreateTable( - name: "RoleParentChildren", - columns: table => new - { - ChildId = table.Column(type: "bigint", nullable: false), - ParentId = table.Column(type: "bigint", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_RoleParentChildren", x => new { x.ParentId, x.ChildId }); - table.ForeignKey( - name: "FK_RoleParentChildren_Roles_ChildId", - column: x => x.ChildId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_RoleParentChildren_Roles_ParentId", - column: x => x.ParentId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.InsertData( - table: "Roles", - columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "Name", "UniqueIdentity" }, - values: new object[,] - { - { 1L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "Owner", null }, - { 2L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "SystemAdmin", null }, - { 3L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "SuperAdmin", null }, - { 4L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "HardWriter", null }, - { 5L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "Moderator", null }, - { 6L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "HardReader", null }, - { 7L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "Operator", null }, - { 8L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "EndUser", null }, - { 9L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "SoftWriter", null }, - { 10L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, "SoftReader", null } - }); - - migrationBuilder.InsertData( - table: "ServicePermissions", - columns: new[] { "Id", "AccessType", "CreationDateTime", "DeletedDateTime", "IsDeleted", "MethodName", "MicroserviceName", "ModificationDateTime", "ServiceName", "UniqueIdentity" }, - values: new object[,] - { - { 1L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, null, null, null, null }, - { 2L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "GetById", null, null, null, null }, - { 3L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "Filter", null, null, null, null }, - { 4L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "GetByUniqueIdentity", null, null, null, null }, - { 5L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "GetAllByUniqueIdentity", null, null, null, null }, - { 6L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "GetAll", null, null, null, null }, - { 7L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "Add", null, null, null, null }, - { 8L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "Update", null, null, null, null }, - { 9L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "SoftDeleteById", null, null, null, null }, - { 10L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "SoftDeleteBulkByIds", null, null, null, null }, - { 11L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "AddBulk", null, null, null, null }, - { 12L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "UpdateBulk", null, null, null, null }, - { 13L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "HardDeleteById", null, null, null, null }, - { 14L, (byte)6, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, "HardDeleteBulkByIds", null, null, null, null } - }); - - migrationBuilder.InsertData( - table: "RoleParentChildren", - columns: new[] { "ChildId", "ParentId" }, - values: new object[,] - { - { 1L, 2L }, - { 2L, 3L }, - { 2L, 4L }, - { 3L, 5L }, - { 3L, 6L }, - { 5L, 7L }, - { 5L, 8L }, - { 2L, 9L }, - { 5L, 9L }, - { 5L, 10L } - }); - - migrationBuilder.InsertData( - table: "RoleServicePermissions", - columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "RoleId", "ServicePermissionId", "UniqueIdentity" }, - values: new object[,] - { - { 1L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 1L, 1L, null }, - { 2L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 10L, 2L, null }, - { 3L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 10L, 3L, null }, - { 4L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 10L, 4L, null }, - { 5L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 6L, 5L, null }, - { 6L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 6L, 6L, null }, - { 7L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 9L, 7L, null }, - { 8L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 9L, 8L, null }, - { 9L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 9L, 9L, null }, - { 10L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 9L, 10L, null }, - { 11L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 9L, 11L, null }, - { 12L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 9L, 12L, null }, - { 13L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 4L, 13L, null }, - { 14L, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, false, null, 4L, 14L, null } - }); - - migrationBuilder.CreateIndex( - name: "IX_RoleParentChildren_ChildId", - table: "RoleParentChildren", - column: "ChildId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RoleParentChildren"); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 1L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 2L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 3L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 4L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 5L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 6L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 7L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 8L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 9L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 10L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 11L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 12L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 13L); - - migrationBuilder.DeleteData( - table: "RoleServicePermissions", - keyColumn: "Id", - keyValue: 14L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 2L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 3L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 5L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 7L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 8L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 1L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 4L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 6L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 9L); - - migrationBuilder.DeleteData( - table: "Roles", - keyColumn: "Id", - keyValue: 10L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 1L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 2L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 3L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 4L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 5L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 6L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 7L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 8L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 9L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 10L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 11L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 12L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 13L); - - migrationBuilder.DeleteData( - table: "ServicePermissions", - keyColumn: "Id", - keyValue: 14L); - - migrationBuilder.DropColumn( - name: "AccessType", - table: "ServicePermissions"); - - migrationBuilder.AddColumn( - name: "ParentId", - table: "Roles", - type: "bigint", - nullable: true); - - migrationBuilder.CreateIndex( - name: "IX_Roles_ParentId", - table: "Roles", - column: "ParentId"); - - migrationBuilder.AddForeignKey( - name: "FK_Roles_Roles_ParentId", - table: "Roles", - column: "ParentId", - principalTable: "Roles", - principalColumn: "Id"); - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.Designer.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.Designer.cs similarity index 68% rename from src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.Designer.cs rename to src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.Designer.cs index 0c64407..98161ad 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231104145000_AddRoleParentChild_SomeSeedData.Designer.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.Designer.cs @@ -12,19 +12,76 @@ namespace EasyMicroservices.AuthenticationsMicroservice.Migrations { [DbContext(typeof(AuthenticationsContext))] - [Migration("20231104145000_AddRoleParentChild_SomeSeedData")] - partial class AddRoleParentChild_SomeSeedData + [Migration("20231204060829_FirstInitialize")] + partial class FirstInitialize { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.13") + .HasAnnotation("ProductVersion", "7.0.14") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.PersonalAccessTokenEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDateTime") + .HasColumnType("datetime2"); + + b.Property("DeletedDateTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModificationDateTime") + .HasColumnType("datetime2"); + + b.Property("UniqueIdentity") + .HasColumnType("nvarchar(450)") + .UseCollation("SQL_Latin1_General_CP1_CS_AS"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreationDateTime"); + + b.HasIndex("DeletedDateTime"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ModificationDateTime"); + + b.HasIndex("UniqueIdentity"); + + b.HasIndex("UserId"); + + b.ToTable("PersonalAccessTokens"); + + b.HasData( + new + { + Id = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3061), + IsDeleted = false, + UserId = 1L, + Value = "ownerpat" + }); + }); + modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => { b.Property("Id") @@ -70,70 +127,70 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 1L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2492), IsDeleted = false, Name = "Owner" }, new { Id = 2L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2506), IsDeleted = false, Name = "SystemAdmin" }, new { Id = 3L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2507), IsDeleted = false, Name = "SuperAdmin" }, new { Id = 4L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2507), IsDeleted = false, Name = "HardWriter" }, new { Id = 5L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), IsDeleted = false, Name = "Moderator" }, new { Id = 6L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), IsDeleted = false, Name = "HardReader" }, new { Id = 7L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), IsDeleted = false, Name = "Operator" }, new { Id = 8L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), IsDeleted = false, Name = "EndUser" }, new { Id = 9L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), IsDeleted = false, Name = "SoftWriter" }, new { Id = 10L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), IsDeleted = false, Name = "SoftReader" }); @@ -147,62 +204,108 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("ChildId") .HasColumnType("bigint"); + b.Property("CreationDateTime") + .HasColumnType("datetime2"); + + b.Property("DeletedDateTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModificationDateTime") + .HasColumnType("datetime2"); + + b.Property("UniqueIdentity") + .HasColumnType("nvarchar(450)") + .UseCollation("SQL_Latin1_General_CP1_CS_AS"); + b.HasKey("ParentId", "ChildId"); b.HasIndex("ChildId"); + b.HasIndex("CreationDateTime"); + + b.HasIndex("DeletedDateTime"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ModificationDateTime"); + + b.HasIndex("UniqueIdentity"); + b.ToTable("RoleParentChildren"); b.HasData( new { ParentId = 2L, - ChildId = 1L + ChildId = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2871), + IsDeleted = false }, new { ParentId = 3L, - ChildId = 2L + ChildId = 2L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2872), + IsDeleted = false }, new { ParentId = 4L, - ChildId = 2L + ChildId = 2L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2872), + IsDeleted = false }, new { ParentId = 5L, - ChildId = 3L + ChildId = 3L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2873), + IsDeleted = false }, new { ParentId = 6L, - ChildId = 3L + ChildId = 3L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2873), + IsDeleted = false }, new { ParentId = 7L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), + IsDeleted = false }, new { ParentId = 8L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), + IsDeleted = false }, new { ParentId = 9L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), + IsDeleted = false }, new { ParentId = 10L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2875), + IsDeleted = false }, new { ParentId = 9L, - ChildId = 2L + ChildId = 2L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2875), + IsDeleted = false }); }); @@ -258,7 +361,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 1L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), IsDeleted = false, RoleId = 1L, ServicePermissionId = 1L @@ -266,7 +369,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 2L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), IsDeleted = false, RoleId = 10L, ServicePermissionId = 2L @@ -274,7 +377,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 3L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), IsDeleted = false, RoleId = 10L, ServicePermissionId = 3L @@ -282,7 +385,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 4L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2992), IsDeleted = false, RoleId = 10L, ServicePermissionId = 4L @@ -290,7 +393,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 5L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2992), IsDeleted = false, RoleId = 6L, ServicePermissionId = 5L @@ -298,7 +401,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 6L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), IsDeleted = false, RoleId = 6L, ServicePermissionId = 6L @@ -306,7 +409,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 7L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), IsDeleted = false, RoleId = 9L, ServicePermissionId = 7L @@ -314,7 +417,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 8L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), IsDeleted = false, RoleId = 9L, ServicePermissionId = 8L @@ -322,7 +425,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 9L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), IsDeleted = false, RoleId = 9L, ServicePermissionId = 9L @@ -330,7 +433,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 10L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), IsDeleted = false, RoleId = 9L, ServicePermissionId = 10L @@ -338,7 +441,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 11L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), IsDeleted = false, RoleId = 9L, ServicePermissionId = 11L @@ -346,7 +449,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 12L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), IsDeleted = false, RoleId = 9L, ServicePermissionId = 12L @@ -354,7 +457,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 13L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), IsDeleted = false, RoleId = 4L, ServicePermissionId = 13L @@ -362,7 +465,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) new { Id = 14L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), IsDeleted = false, RoleId = 4L, ServicePermissionId = 14L @@ -434,14 +537,14 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 1L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2915), IsDeleted = false }, new { Id = 2L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2915), IsDeleted = false, MethodName = "GetById" }, @@ -449,7 +552,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 3L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2916), IsDeleted = false, MethodName = "Filter" }, @@ -457,7 +560,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 4L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2916), IsDeleted = false, MethodName = "GetByUniqueIdentity" }, @@ -465,7 +568,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 5L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), IsDeleted = false, MethodName = "GetAllByUniqueIdentity" }, @@ -473,7 +576,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 6L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), IsDeleted = false, MethodName = "GetAll" }, @@ -481,7 +584,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 7L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), IsDeleted = false, MethodName = "Add" }, @@ -489,7 +592,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 8L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), IsDeleted = false, MethodName = "Update" }, @@ -497,7 +600,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 9L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), IsDeleted = false, MethodName = "SoftDeleteById" }, @@ -505,7 +608,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 10L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), IsDeleted = false, MethodName = "SoftDeleteBulkByIds" }, @@ -513,7 +616,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 11L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), IsDeleted = false, MethodName = "AddBulk" }, @@ -521,7 +624,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 12L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), IsDeleted = false, MethodName = "UpdateBulk" }, @@ -529,7 +632,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 13L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), IsDeleted = false, MethodName = "HardDeleteById" }, @@ -537,7 +640,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { Id = 14L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2920), IsDeleted = false, MethodName = "HardDeleteBulkByIds" }); @@ -560,7 +663,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Property("IsDeleted") .HasColumnType("bit"); - b.Property("IsUsernameVerified") + b.Property("IsVerified") .HasColumnType("bit"); b.Property("ModificationDateTime") @@ -596,6 +699,16 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasFilter("[UserName] IS NOT NULL"); b.ToTable("Users"); + + b.HasData( + new + { + Id = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3022), + IsDeleted = false, + IsVerified = true, + UserName = "Owner" + }); }); modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserRoleEntity", b => @@ -645,6 +758,27 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("UserId"); b.ToTable("UserRoles"); + + b.HasData( + new + { + Id = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3040), + IsDeleted = false, + RoleId = 1L, + UserId = 1L + }); + }); + + modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.PersonalAccessTokenEntity", b => + { + b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", "User") + .WithMany("PersonalAccessTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); }); modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleParentChildEntity", b => @@ -722,6 +856,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => { + b.Navigation("PersonalAccessTokens"); + b.Navigation("UserRoles"); }); #pragma warning restore 612, 618 diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.cs new file mode 100644 index 0000000..24a7c64 --- /dev/null +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/20231204060829_FirstInitialize.cs @@ -0,0 +1,548 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace EasyMicroservices.AuthenticationsMicroservice.Migrations +{ + /// + public partial class FirstInitialize : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Roles", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), + Name = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Roles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ServicePermissions", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), + MicroserviceName = table.Column(type: "nvarchar(450)", nullable: true), + ServiceName = table.Column(type: "nvarchar(450)", nullable: true), + MethodName = table.Column(type: "nvarchar(450)", nullable: true), + AccessType = table.Column(type: "tinyint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ServicePermissions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), + UserName = table.Column(type: "nvarchar(450)", nullable: true), + Password = table.Column(type: "nvarchar(max)", nullable: true), + IsVerified = table.Column(type: "bit", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "RoleParentChildren", + columns: table => new + { + ChildId = table.Column(type: "bigint", nullable: false), + ParentId = table.Column(type: "bigint", nullable: false), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS") + }, + constraints: table => + { + table.PrimaryKey("PK_RoleParentChildren", x => new { x.ParentId, x.ChildId }); + table.ForeignKey( + name: "FK_RoleParentChildren_Roles_ChildId", + column: x => x.ChildId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_RoleParentChildren_Roles_ParentId", + column: x => x.ParentId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "RoleServicePermissions", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RoleId = table.Column(type: "bigint", nullable: false), + ServicePermissionId = table.Column(type: "bigint", nullable: false), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS") + }, + constraints: table => + { + table.PrimaryKey("PK_RoleServicePermissions", x => x.Id); + table.ForeignKey( + name: "FK_RoleServicePermissions_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_RoleServicePermissions_ServicePermissions_ServicePermissionId", + column: x => x.ServicePermissionId, + principalTable: "ServicePermissions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "PersonalAccessTokens", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + UserId = table.Column(type: "bigint", nullable: false), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS"), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_PersonalAccessTokens", x => x.Id); + table.ForeignKey( + name: "FK_PersonalAccessTokens_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserRoles", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RoleId = table.Column(type: "bigint", nullable: false), + UserId = table.Column(type: "bigint", nullable: false), + CreationDateTime = table.Column(type: "datetime2", nullable: false), + ModificationDateTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false), + DeletedDateTime = table.Column(type: "datetime2", nullable: true), + UniqueIdentity = table.Column(type: "nvarchar(450)", nullable: true, collation: "SQL_Latin1_General_CP1_CS_AS") + }, + constraints: table => + { + table.PrimaryKey("PK_UserRoles", x => x.Id); + table.ForeignKey( + name: "FK_UserRoles_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserRoles_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Roles", + columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "Name", "UniqueIdentity" }, + values: new object[,] + { + { 1L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2492), null, false, null, "Owner", null }, + { 2L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2506), null, false, null, "SystemAdmin", null }, + { 3L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2507), null, false, null, "SuperAdmin", null }, + { 4L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2507), null, false, null, "HardWriter", null }, + { 5L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), null, false, null, "Moderator", null }, + { 6L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), null, false, null, "HardReader", null }, + { 7L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), null, false, null, "Operator", null }, + { 8L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), null, false, null, "EndUser", null }, + { 9L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), null, false, null, "SoftWriter", null }, + { 10L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), null, false, null, "SoftReader", null } + }); + + migrationBuilder.InsertData( + table: "ServicePermissions", + columns: new[] { "Id", "AccessType", "CreationDateTime", "DeletedDateTime", "IsDeleted", "MethodName", "MicroserviceName", "ModificationDateTime", "ServiceName", "UniqueIdentity" }, + values: new object[,] + { + { 1L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2915), null, false, null, null, null, null, null }, + { 2L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2915), null, false, "GetById", null, null, null, null }, + { 3L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2916), null, false, "Filter", null, null, null, null }, + { 4L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2916), null, false, "GetByUniqueIdentity", null, null, null, null }, + { 5L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), null, false, "GetAllByUniqueIdentity", null, null, null, null }, + { 6L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), null, false, "GetAll", null, null, null, null }, + { 7L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), null, false, "Add", null, null, null, null }, + { 8L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), null, false, "Update", null, null, null, null }, + { 9L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), null, false, "SoftDeleteById", null, null, null, null }, + { 10L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), null, false, "SoftDeleteBulkByIds", null, null, null, null }, + { 11L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), null, false, "AddBulk", null, null, null, null }, + { 12L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), null, false, "UpdateBulk", null, null, null, null }, + { 13L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), null, false, "HardDeleteById", null, null, null, null }, + { 14L, (byte)6, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2920), null, false, "HardDeleteBulkByIds", null, null, null, null } + }); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "IsVerified", "ModificationDateTime", "Password", "UniqueIdentity", "UserName" }, + values: new object[] { 1L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3022), null, false, true, null, null, null, "Owner" }); + + migrationBuilder.InsertData( + table: "PersonalAccessTokens", + columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "UniqueIdentity", "UserId", "Value" }, + values: new object[] { 1L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3061), null, false, null, null, 1L, "ownerpat" }); + + migrationBuilder.InsertData( + table: "RoleParentChildren", + columns: new[] { "ChildId", "ParentId", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "UniqueIdentity" }, + values: new object[,] + { + { 1L, 2L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2871), null, false, null, null }, + { 2L, 3L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2872), null, false, null, null }, + { 2L, 4L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2872), null, false, null, null }, + { 3L, 5L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2873), null, false, null, null }, + { 3L, 6L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2873), null, false, null, null }, + { 5L, 7L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), null, false, null, null }, + { 5L, 8L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), null, false, null, null }, + { 2L, 9L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2875), null, false, null, null }, + { 5L, 9L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), null, false, null, null }, + { 5L, 10L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2875), null, false, null, null } + }); + + migrationBuilder.InsertData( + table: "RoleServicePermissions", + columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "RoleId", "ServicePermissionId", "UniqueIdentity" }, + values: new object[,] + { + { 1L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), null, false, null, 1L, 1L, null }, + { 2L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), null, false, null, 10L, 2L, null }, + { 3L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), null, false, null, 10L, 3L, null }, + { 4L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2992), null, false, null, 10L, 4L, null }, + { 5L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2992), null, false, null, 6L, 5L, null }, + { 6L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), null, false, null, 6L, 6L, null }, + { 7L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), null, false, null, 9L, 7L, null }, + { 8L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), null, false, null, 9L, 8L, null }, + { 9L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), null, false, null, 9L, 9L, null }, + { 10L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), null, false, null, 9L, 10L, null }, + { 11L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), null, false, null, 9L, 11L, null }, + { 12L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), null, false, null, 9L, 12L, null }, + { 13L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), null, false, null, 4L, 13L, null }, + { 14L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), null, false, null, 4L, 14L, null } + }); + + migrationBuilder.InsertData( + table: "UserRoles", + columns: new[] { "Id", "CreationDateTime", "DeletedDateTime", "IsDeleted", "ModificationDateTime", "RoleId", "UniqueIdentity", "UserId" }, + values: new object[] { 1L, new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3040), null, false, null, 1L, null, 1L }); + + migrationBuilder.CreateIndex( + name: "IX_PersonalAccessTokens_CreationDateTime", + table: "PersonalAccessTokens", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_PersonalAccessTokens_DeletedDateTime", + table: "PersonalAccessTokens", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_PersonalAccessTokens_IsDeleted", + table: "PersonalAccessTokens", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_PersonalAccessTokens_ModificationDateTime", + table: "PersonalAccessTokens", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_PersonalAccessTokens_UniqueIdentity", + table: "PersonalAccessTokens", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_PersonalAccessTokens_UserId", + table: "PersonalAccessTokens", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_RoleParentChildren_ChildId", + table: "RoleParentChildren", + column: "ChildId"); + + migrationBuilder.CreateIndex( + name: "IX_RoleParentChildren_CreationDateTime", + table: "RoleParentChildren", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_RoleParentChildren_DeletedDateTime", + table: "RoleParentChildren", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_RoleParentChildren_IsDeleted", + table: "RoleParentChildren", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_RoleParentChildren_ModificationDateTime", + table: "RoleParentChildren", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_RoleParentChildren_UniqueIdentity", + table: "RoleParentChildren", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_Roles_CreationDateTime", + table: "Roles", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_Roles_DeletedDateTime", + table: "Roles", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_Roles_IsDeleted", + table: "Roles", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_Roles_ModificationDateTime", + table: "Roles", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_Roles_UniqueIdentity", + table: "Roles", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_CreationDateTime", + table: "RoleServicePermissions", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_DeletedDateTime", + table: "RoleServicePermissions", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_IsDeleted", + table: "RoleServicePermissions", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_ModificationDateTime", + table: "RoleServicePermissions", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_RoleId", + table: "RoleServicePermissions", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_ServicePermissionId", + table: "RoleServicePermissions", + column: "ServicePermissionId"); + + migrationBuilder.CreateIndex( + name: "IX_RoleServicePermissions_UniqueIdentity", + table: "RoleServicePermissions", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_CreationDateTime", + table: "ServicePermissions", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_DeletedDateTime", + table: "ServicePermissions", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_IsDeleted", + table: "ServicePermissions", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_MethodName", + table: "ServicePermissions", + column: "MethodName"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_MicroserviceName", + table: "ServicePermissions", + column: "MicroserviceName"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_MicroserviceName_ServiceName_MethodName", + table: "ServicePermissions", + columns: new[] { "MicroserviceName", "ServiceName", "MethodName" }, + unique: true, + filter: "[MicroserviceName] IS NOT NULL AND [ServiceName] IS NOT NULL AND [MethodName] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_ModificationDateTime", + table: "ServicePermissions", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_ServiceName", + table: "ServicePermissions", + column: "ServiceName"); + + migrationBuilder.CreateIndex( + name: "IX_ServicePermissions_UniqueIdentity", + table: "ServicePermissions", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_CreationDateTime", + table: "UserRoles", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_DeletedDateTime", + table: "UserRoles", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_IsDeleted", + table: "UserRoles", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_ModificationDateTime", + table: "UserRoles", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_RoleId", + table: "UserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_UniqueIdentity", + table: "UserRoles", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_UserId", + table: "UserRoles", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Users_CreationDateTime", + table: "Users", + column: "CreationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_Users_DeletedDateTime", + table: "Users", + column: "DeletedDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_Users_Id", + table: "Users", + column: "Id", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Users_IsDeleted", + table: "Users", + column: "IsDeleted"); + + migrationBuilder.CreateIndex( + name: "IX_Users_ModificationDateTime", + table: "Users", + column: "ModificationDateTime"); + + migrationBuilder.CreateIndex( + name: "IX_Users_UniqueIdentity", + table: "Users", + column: "UniqueIdentity"); + + migrationBuilder.CreateIndex( + name: "IX_Users_UserName", + table: "Users", + column: "UserName", + unique: true, + filter: "[UserName] IS NOT NULL"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "PersonalAccessTokens"); + + migrationBuilder.DropTable( + name: "RoleParentChildren"); + + migrationBuilder.DropTable( + name: "RoleServicePermissions"); + + migrationBuilder.DropTable( + name: "UserRoles"); + + migrationBuilder.DropTable( + name: "ServicePermissions"); + + migrationBuilder.DropTable( + name: "Roles"); + + migrationBuilder.DropTable( + name: "Users"); + } + } +} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/AuthenticationsContextModelSnapshot.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/AuthenticationsContextModelSnapshot.cs index 6377a50..fafdd03 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/AuthenticationsContextModelSnapshot.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/Migrations/AuthenticationsContextModelSnapshot.cs @@ -17,11 +17,68 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.13") + .HasAnnotation("ProductVersion", "7.0.14") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.PersonalAccessTokenEntity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreationDateTime") + .HasColumnType("datetime2"); + + b.Property("DeletedDateTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModificationDateTime") + .HasColumnType("datetime2"); + + b.Property("UniqueIdentity") + .HasColumnType("nvarchar(450)") + .UseCollation("SQL_Latin1_General_CP1_CS_AS"); + + b.Property("UserId") + .HasColumnType("bigint"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CreationDateTime"); + + b.HasIndex("DeletedDateTime"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ModificationDateTime"); + + b.HasIndex("UniqueIdentity"); + + b.HasIndex("UserId"); + + b.ToTable("PersonalAccessTokens"); + + b.HasData( + new + { + Id = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3061), + IsDeleted = false, + UserId = 1L, + Value = "ownerpat" + }); + }); + modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleEntity", b => { b.Property("Id") @@ -67,70 +124,70 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 1L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2492), IsDeleted = false, Name = "Owner" }, new { Id = 2L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2506), IsDeleted = false, Name = "SystemAdmin" }, new { Id = 3L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2507), IsDeleted = false, Name = "SuperAdmin" }, new { Id = 4L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2507), IsDeleted = false, Name = "HardWriter" }, new { Id = 5L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), IsDeleted = false, Name = "Moderator" }, new { Id = 6L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), IsDeleted = false, Name = "HardReader" }, new { Id = 7L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2508), IsDeleted = false, Name = "Operator" }, new { Id = 8L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), IsDeleted = false, Name = "EndUser" }, new { Id = 9L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), IsDeleted = false, Name = "SoftWriter" }, new { Id = 10L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2509), IsDeleted = false, Name = "SoftReader" }); @@ -144,62 +201,108 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ChildId") .HasColumnType("bigint"); + b.Property("CreationDateTime") + .HasColumnType("datetime2"); + + b.Property("DeletedDateTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ModificationDateTime") + .HasColumnType("datetime2"); + + b.Property("UniqueIdentity") + .HasColumnType("nvarchar(450)") + .UseCollation("SQL_Latin1_General_CP1_CS_AS"); + b.HasKey("ParentId", "ChildId"); b.HasIndex("ChildId"); + b.HasIndex("CreationDateTime"); + + b.HasIndex("DeletedDateTime"); + + b.HasIndex("IsDeleted"); + + b.HasIndex("ModificationDateTime"); + + b.HasIndex("UniqueIdentity"); + b.ToTable("RoleParentChildren"); b.HasData( new { ParentId = 2L, - ChildId = 1L + ChildId = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2871), + IsDeleted = false }, new { ParentId = 3L, - ChildId = 2L + ChildId = 2L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2872), + IsDeleted = false }, new { ParentId = 4L, - ChildId = 2L + ChildId = 2L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2872), + IsDeleted = false }, new { ParentId = 5L, - ChildId = 3L + ChildId = 3L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2873), + IsDeleted = false }, new { ParentId = 6L, - ChildId = 3L + ChildId = 3L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2873), + IsDeleted = false }, new { ParentId = 7L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), + IsDeleted = false }, new { ParentId = 8L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), + IsDeleted = false }, new { ParentId = 9L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2874), + IsDeleted = false }, new { ParentId = 10L, - ChildId = 5L + ChildId = 5L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2875), + IsDeleted = false }, new { ParentId = 9L, - ChildId = 2L + ChildId = 2L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2875), + IsDeleted = false }); }); @@ -255,7 +358,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 1L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), IsDeleted = false, RoleId = 1L, ServicePermissionId = 1L @@ -263,7 +366,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 2L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), IsDeleted = false, RoleId = 10L, ServicePermissionId = 2L @@ -271,7 +374,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 3L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2991), IsDeleted = false, RoleId = 10L, ServicePermissionId = 3L @@ -279,7 +382,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 4L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2992), IsDeleted = false, RoleId = 10L, ServicePermissionId = 4L @@ -287,7 +390,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 5L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2992), IsDeleted = false, RoleId = 6L, ServicePermissionId = 5L @@ -295,7 +398,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 6L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), IsDeleted = false, RoleId = 6L, ServicePermissionId = 6L @@ -303,7 +406,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 7L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), IsDeleted = false, RoleId = 9L, ServicePermissionId = 7L @@ -311,7 +414,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 8L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2993), IsDeleted = false, RoleId = 9L, ServicePermissionId = 8L @@ -319,7 +422,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 9L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), IsDeleted = false, RoleId = 9L, ServicePermissionId = 9L @@ -327,7 +430,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 10L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), IsDeleted = false, RoleId = 9L, ServicePermissionId = 10L @@ -335,7 +438,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 11L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2994), IsDeleted = false, RoleId = 9L, ServicePermissionId = 11L @@ -343,7 +446,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 12L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), IsDeleted = false, RoleId = 9L, ServicePermissionId = 12L @@ -351,7 +454,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 13L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), IsDeleted = false, RoleId = 4L, ServicePermissionId = 13L @@ -359,7 +462,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) new { Id = 14L, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2995), IsDeleted = false, RoleId = 4L, ServicePermissionId = 14L @@ -431,14 +534,14 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 1L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2915), IsDeleted = false }, new { Id = 2L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2915), IsDeleted = false, MethodName = "GetById" }, @@ -446,7 +549,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 3L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2916), IsDeleted = false, MethodName = "Filter" }, @@ -454,7 +557,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 4L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2916), IsDeleted = false, MethodName = "GetByUniqueIdentity" }, @@ -462,7 +565,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 5L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), IsDeleted = false, MethodName = "GetAllByUniqueIdentity" }, @@ -470,7 +573,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 6L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), IsDeleted = false, MethodName = "GetAll" }, @@ -478,7 +581,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 7L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2917), IsDeleted = false, MethodName = "Add" }, @@ -486,7 +589,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 8L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), IsDeleted = false, MethodName = "Update" }, @@ -494,7 +597,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 9L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), IsDeleted = false, MethodName = "SoftDeleteById" }, @@ -502,7 +605,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 10L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2918), IsDeleted = false, MethodName = "SoftDeleteBulkByIds" }, @@ -510,7 +613,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 11L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), IsDeleted = false, MethodName = "AddBulk" }, @@ -518,7 +621,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 12L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), IsDeleted = false, MethodName = "UpdateBulk" }, @@ -526,7 +629,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 13L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2919), IsDeleted = false, MethodName = "HardDeleteById" }, @@ -534,7 +637,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { Id = 14L, AccessType = (byte)6, - CreationDateTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(2920), IsDeleted = false, MethodName = "HardDeleteBulkByIds" }); @@ -557,7 +660,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("IsDeleted") .HasColumnType("bit"); - b.Property("IsUsernameVerified") + b.Property("IsVerified") .HasColumnType("bit"); b.Property("ModificationDateTime") @@ -593,6 +696,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasFilter("[UserName] IS NOT NULL"); b.ToTable("Users"); + + b.HasData( + new + { + Id = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3022), + IsDeleted = false, + IsVerified = true, + UserName = "Owner" + }); }); modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserRoleEntity", b => @@ -642,6 +755,27 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("UserId"); b.ToTable("UserRoles"); + + b.HasData( + new + { + Id = 1L, + CreationDateTime = new DateTime(2023, 12, 4, 9, 38, 29, 68, DateTimeKind.Local).AddTicks(3040), + IsDeleted = false, + RoleId = 1L, + UserId = 1L + }); + }); + + modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.PersonalAccessTokenEntity", b => + { + b.HasOne("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", "User") + .WithMany("PersonalAccessTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); }); modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.RoleParentChildEntity", b => @@ -719,6 +853,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("EasyMicroservices.AuthenticationsMicroservice.Database.Entities.UserEntity", b => { + b.Navigation("PersonalAccessTokens"); + b.Navigation("UserRoles"); }); #pragma warning restore 612, 618 diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/SeedData/AllSeedData.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/SeedData/AllSeedData.cs index d98af6b..677fcc0 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/SeedData/AllSeedData.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/SeedData/AllSeedData.cs @@ -67,52 +67,52 @@ public static void Seed(ModelBuilder modelBuilder) .HasData(FixDefaultValues( new RoleParentChildEntity() { - ChildId = 1, - ParentId = 2 + ChildId = 2, + ParentId = 1 }, new RoleParentChildEntity() { - ChildId = 2, - ParentId = 3 + ChildId = 3, + ParentId = 2 }, new RoleParentChildEntity() { - ChildId = 2, - ParentId = 4 + ChildId = 4, + ParentId = 2 }, new RoleParentChildEntity() { - ChildId = 3, - ParentId = 5 + ChildId = 5, + ParentId = 3 }, new RoleParentChildEntity() { - ChildId = 3, - ParentId = 6 + ChildId = 6, + ParentId = 3 }, new RoleParentChildEntity() { - ChildId = 5, - ParentId = 7 + ChildId = 7, + ParentId = 5 }, new RoleParentChildEntity() { - ChildId = 5, - ParentId = 8 + ChildId = 8, + ParentId = 5 }, new RoleParentChildEntity() { - ChildId = 5, - ParentId = 9 + ChildId = 9, + ParentId = 5 }, new RoleParentChildEntity() { - ChildId = 5, - ParentId = 10 + ChildId = 10, + ParentId = 5 }, new RoleParentChildEntity() { - ChildId = 2, - ParentId = 9 + ChildId = 9, + ParentId = 2 })); modelBuilder diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Common/UserSummaryContract.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Common/UserSummaryContract.cs index b79b723..a5e40dd 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Common/UserSummaryContract.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Common/UserSummaryContract.cs @@ -1,4 +1,5 @@ -using System; +using EasyMicroservices.Cores.Interfaces; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,9 +7,10 @@ namespace EasyMicroservices.AuthenticationsMicroservice.Contracts.Common { - public class UserSummaryContract + public class UserSummaryContract : IUniqueIdentitySchema { public string UserName { get; set; } public string Password { get; set; } + public string UniqueIdentity { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetByIdAndUniqueIdentityRequestContract.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetByIdAndUniqueIdentityRequestContract.cs new file mode 100644 index 0000000..7c72f0d --- /dev/null +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetByIdAndUniqueIdentityRequestContract.cs @@ -0,0 +1,8 @@ +using EasyMicroservices.Cores.Interfaces; + +namespace EasyMicroservices.AuthenticationsMicroservice.Contracts.Requests; +public class GetByIdAndUniqueIdentityRequestContract : IUniqueIdentitySchema +{ + public long Id { get; set; } + public string UniqueIdentity { get; set; } +} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetUserByUserNameRequestContract.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetUserByUserNameRequestContract.cs index da1cb01..a0ad837 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetUserByUserNameRequestContract.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/GetUserByUserNameRequestContract.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using EasyMicroservices.Cores.Interfaces; namespace EasyMicroservices.AuthenticationsMicroservice.Contracts.Requests { - public class GetUserByUserNameRequestContract + public class GetUserByUserNameRequestContract : IUniqueIdentitySchema { - public string Username { get; set; } + public string UserName { get; set; } + public string UniqueIdentity { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/ServicePermissionRequestContract.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/ServicePermissionRequestContract.cs index f9d9631..b31aeda 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/ServicePermissionRequestContract.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/Contracts/Requests/ServicePermissionRequestContract.cs @@ -1,11 +1,14 @@ -namespace EasyMicroservices.AuthenticationsMicroservice.Contracts.Requests +using EasyMicroservices.Cores.Interfaces; + +namespace EasyMicroservices.AuthenticationsMicroservice.Contracts.Requests { /// /// /// - public class ServicePermissionRequestContract + public class ServicePermissionRequestContract : IUniqueIdentitySchema { public string RoleName { get; set; } public string MicroserviceName { get; set; } + public string UniqueIdentity { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj index 3303f04..60a7ace 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj @@ -10,8 +10,7 @@ - - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Logics/EasyMicroservices.AuthenticationsMicroservice.Logics.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Logics/EasyMicroservices.AuthenticationsMicroservice.Logics.csproj index 7bb3faa..90dc237 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Logics/EasyMicroservices.AuthenticationsMicroservice.Logics.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Logics/EasyMicroservices.AuthenticationsMicroservice.Logics.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs index 1df34f5..7210113 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/DatabaseBuilder.cs @@ -1,21 +1,21 @@ -using EasyMicroservices.Cores.Relational.EntityFrameworkCore.Intrerfaces; +using EasyMicroservices.Cores.Relational.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; namespace EasyMicroservices.AuthenticationsMicroservice { - public class DatabaseBuilder : IEntityFrameworkCoreDatabaseBuilder + public class DatabaseBuilder : EntityFrameworkCoreDatabaseBuilder { - IConfiguration _configuration; - public DatabaseBuilder(IConfiguration configuration) + public DatabaseBuilder(IConfiguration configuration) : base(configuration) { - _configuration = configuration; } - public void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + public override void OnConfiguring(DbContextOptionsBuilder optionsBuilder, string name) { - //optionsBuilder.UseInMemoryDatabase("AuthDb"); - optionsBuilder.UseSqlServer(_configuration.GetConnectionString("local")); + if (name == "SqlServer") + optionsBuilder.UseSqlServer(Configuration.GetConnectionString("local")); + else + optionsBuilder.UseInMemoryDatabase("Authentication"); } } } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs index 89a065b..6682509 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs @@ -19,10 +19,12 @@ public RoleController(IBaseUnitOfWork unitOfWork) : base(unitOfWork) [HttpPost] [AllowAnonymous] - public async Task> GetRolesByUserId(GetIdRequestContract request) + public async Task> GetRolesByUserId(GetByIdAndUniqueIdentityRequestContract request) { var result = await UnitOfWork.GetLongLogic() - .GetAll(q => q.Include(x => x.User) + .GetAllByUniqueIdentity(request, + Cores.DataTypes.GetUniqueIdentityType.All, + q => q.Include(x => x.User) .Include(x => x.Role) .Where(x => x.UserId == request.Id)) .AsCheckedResult(); diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/ServicePermissionController.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/ServicePermissionController.cs index 41977f5..535ce53 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/ServicePermissionController.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/ServicePermissionController.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; +using System.Text; namespace EasyMicroservices.AuthenticationsMicroservice.WebApi.Controllers { @@ -33,7 +34,8 @@ public async Task> GetAllPermissi .Where(x => roleIds.Contains(x.RoleId) && (x.ServicePermission.MicroserviceName == null || x.ServicePermission.MicroserviceName == request.MicroserviceName)) .Select(x => x.ServicePermission) .ToListAsync(cancellationToken); - + if (request.UniqueIdentity.HasValue()) + servicePermissions = servicePermissions.Where(x => x.UniqueIdentity.StartsWith(request.UniqueIdentity + "-")).ToList(); return UnitOfWork.GetMapper().MapToList(servicePermissions.Distinct()); } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/UserController.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/UserController.cs index 49cf607..8a4130c 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/UserController.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/UserController.cs @@ -22,13 +22,19 @@ public UserController(IUnitOfWork unitOfWork) : base(unitOfWork) [HttpPost] public async Task> GetUserByUserName(GetUserByUserNameRequestContract request) { - return await _unitOfWork.GetContractLogic().GetBy(x => x.UserName == request.Username); + return await _unitOfWork.GetContractLogic() + .GetByUniqueIdentity(request, + Cores.DataTypes.GetUniqueIdentityType.All, + q => q.Where(x => x.UserName == request.UserName)); } [HttpPost] public async Task> VerifyUserIdentity(UserSummaryContract request) { - return await _unitOfWork.GetContractLogic().GetBy(x => x.UserName == request.UserName && x.Password == request.Password); + return await _unitOfWork.GetContractLogic() + .GetByUniqueIdentity(request, + Cores.DataTypes.GetUniqueIdentityType.All, + q => q.Where(x => x.UserName == request.UserName && x.Password == request.Password)); } [HttpPost] diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Program.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Program.cs index 0b93f22..7a4d54b 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Program.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Program.cs @@ -1,12 +1,7 @@ using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts; using EasyMicroservices.Cores.AspEntityFrameworkCoreApi; -using EasyMicroservices.Cores.AspEntityFrameworkCoreApi.Interfaces; using EasyMicroservices.Cores.Interfaces; using EasyMicroservices.Cores.Relational.EntityFrameworkCore.Intrerfaces; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.IdentityModel.Tokens; -using Microsoft.OpenApi.Models; -using System.Text; namespace EasyMicroservices.AuthenticationsMicroservice.WebApi { @@ -15,37 +10,15 @@ public class Program public static async Task Main(string[] args) { var app = CreateBuilder(args); - var build = await app.Build(true); + var build = await app.BuildWithUseCors(null, true); build.MapControllers(); - build.UseCors(MyAllowSpecificOrigins); build.Run(); } - static readonly string MyAllowSpecificOrigins = "_myAllowSpecificOrigins"; - static WebApplicationBuilder CreateBuilder(string[] args) { var app = StartUpExtensions.Create(args); - app.Services.Builder(options => - { - options.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "Bearer" - }, - //Scheme = "oauth2", - Name = "Bearer", - In = ParameterLocation.Header - }, - new List() - } - }); - }).UseDefaultSwaggerOptions(); + app.Services.Builder().UseDefaultSwaggerOptions(); app.Services.AddTransient((serviceProvider) => new UnitOfWork(serviceProvider)); app.Services.AddTransient(serviceProvider => new AuthenticationsContext(serviceProvider.GetService())); app.Services.AddTransient(); @@ -53,14 +26,6 @@ static WebApplicationBuilder CreateBuilder(string[] args) StartUpExtensions.AddWhiteLabel("Authentication", "RootAddresses:WhiteLabel"); StartUpExtensions.AddAuthentication("RootAddresses:Authentication"); - app.Services.AddCors(options => - { - options.AddPolicy(name: MyAllowSpecificOrigins, - policy => - { - policy.AllowAnyOrigin(); - }); - }); return app; } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json index f2e306d..75b64aa 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json @@ -1,19 +1,21 @@ { "Logging": { - "Console": { - "LogLevel": { - "Microsoft.Hosting.Lifetime": "Trace", - "Microsoft.AspNetCore.Authentication": "Information" - } + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", "ConnectionStrings": { - "local": "conn" + "local": "Server=.;Database=Authentication;Integrated Security=True;Trusted_Connection=True;TrustServerCertificate=True" }, "RootAddresses": { - "whitelabel": "http://localhost:1041", - "Authentication": "http://localhost:1044" + "WhiteLabel": "http://localhost:1041", + "Authentication": "http://localhost:1044", + "Contents": "http://localhost:2003" + }, + "Database": { + "ProviderName": "InMemory" }, "Authorization": { "Use": true, @@ -23,7 +25,10 @@ "Audience": "easymicroservices", "TokenExpireTimeInSeconds": 86400 - } + }, + "FullAccessPAT": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJyb2xlIjoiT3duZXIiLCJuYmYiOjE3MDEyNjQ4MTQsImV4cCI6MTcwMTM1MTIxNCwiaWF0IjoxNzAxMjY0ODE0LCJpc3MiOiJodHRwczovL2dpdGh1Yi5jb20vZWFzeW1pY3Jvc2VydmljZXMiLCJhdWQiOiJlYXN5bWljcm9zZXJ2aWNlcyJ9.CcfO9sXz3PY_QED7MwHe0-UJc_We_1NihDkAGonIsUs" }, + + "HasSSL": false, "Urls": "http://*:1044" } From 1c33e06123cd0377d8b72c2955ea88784441bec2 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Mon, 25 Dec 2023 10:37:34 +0330 Subject: [PATCH 3/3] update clients --- ...Microservices.AuthenticationsMicroservice.Clients.csproj | 6 +++--- ...AuthenticationsMicroservice.VirtualServerForTests.csproj | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj index b736271..0983dac 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net6.0 AnyCPU;x64;x86 EasyMicroservices - true + true 0.0.0.17 client generated code. EasyMicroservices@gmail.com @@ -16,8 +16,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests.csproj index 7c948e7..e8cdb55 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests/EasyMicroservices.AuthenticationsMicroservice.VirtualServerForTests.csproj @@ -16,7 +16,7 @@ AnyCPU;x64;x86 EasyMicroservices - true + true 0.0.0.3 authentication virtual server for tests EasyMicroservices@gmail.com