committed by
GitHub
246 changed files with 9715 additions and 819 deletions
@ -0,0 +1,118 @@ |
|||||
|
|
||||
|
Microsoft Visual Studio Solution File, Format Version 12.00 |
||||
|
# Visual Studio Version 16 |
||||
|
VisualStudioVersion = 16.0.29001.49 |
||||
|
MinimumVisualStudioVersion = 10.0.40219.1 |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.Domain.Shared", "src\Lion.AbpPro.BasicManagement.Domain.Shared\Lion.AbpPro.BasicManagement.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.Domain", "src\Lion.AbpPro.BasicManagement.Domain\Lion.AbpPro.BasicManagement.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.Application.Contracts", "src\Lion.AbpPro.BasicManagement.Application.Contracts\Lion.AbpPro.BasicManagement.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.Application", "src\Lion.AbpPro.BasicManagement.Application\Lion.AbpPro.BasicManagement.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" |
||||
|
EndProject |
||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" |
||||
|
EndProject |
||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}" |
||||
|
EndProject |
||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.EntityFrameworkCore", "src\Lion.AbpPro.BasicManagement.EntityFrameworkCore\Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.HttpApi", "src\Lion.AbpPro.BasicManagement.HttpApi\Lion.AbpPro.BasicManagement.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.HttpApi.Client", "src\Lion.AbpPro.BasicManagement.HttpApi.Client\Lion.AbpPro.BasicManagement.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.TestBase", "test\Lion.AbpPro.BasicManagement.TestBase\Lion.AbpPro.BasicManagement.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests", "test\Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests\Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.Domain.Tests", "test\Lion.AbpPro.BasicManagement.Domain.Tests\Lion.AbpPro.BasicManagement.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.Application.Tests", "test\Lion.AbpPro.BasicManagement.Application.Tests\Lion.AbpPro.BasicManagement.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.HttpApi.Host", "host\Lion.AbpPro.BasicManagement.HttpApi.Host\Lion.AbpPro.BasicManagement.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}" |
||||
|
EndProject |
||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp", "test\Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp\Lion.AbpPro.BasicManagement.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" |
||||
|
EndProject |
||||
|
Global |
||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
|
Debug|Any CPU = Debug|Any CPU |
||||
|
Release|Any CPU = Release|Any CPU |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
|
{D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
|
{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
|
{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
|
{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
|
EndGlobalSection |
||||
|
GlobalSection(SolutionProperties) = preSolution |
||||
|
HideSolutionNode = FALSE |
||||
|
EndGlobalSection |
||||
|
GlobalSection(NestedProjects) = preSolution |
||||
|
{D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} |
||||
|
{C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} |
||||
|
{527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} |
||||
|
{E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} |
||||
|
{90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} |
||||
|
{37B135B0-DAFE-4616-B25C-1BDF32FC44A2} = {E400416D-2895-4512-9D17-90681EEC7E0A} |
||||
|
{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ExtensibilityGlobals) = postSolution |
||||
|
SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} |
||||
|
EndGlobalSection |
||||
|
EndGlobal |
||||
@ -0,0 +1,240 @@ |
|||||
|
using System.Text; |
||||
|
using Microsoft.AspNetCore.Authentication.JwtBearer; |
||||
|
using Microsoft.AspNetCore.DataProtection; |
||||
|
using Lion.AbpPro.BasicManagement.EntityFrameworkCore; |
||||
|
using Lion.AbpPro.Shared.Hosting.Microservices; |
||||
|
using Lion.AbpPro.Shared.Hosting.Microservices.Swaggers; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.IdentityModel.Tokens; |
||||
|
using StackExchange.Redis; |
||||
|
using Microsoft.OpenApi.Models; |
||||
|
using Swashbuckle.AspNetCore.SwaggerUI; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.AspNetCore.ExceptionHandling; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; |
||||
|
using Volo.Abp.AspNetCore.Serilog; |
||||
|
using Volo.Abp.Autofac; |
||||
|
using Volo.Abp.Caching; |
||||
|
using Volo.Abp.Caching.StackExchangeRedis; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore.MySQL; |
||||
|
using Volo.Abp.Localization; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.Swashbuckle; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(BasicManagementApplicationModule), |
||||
|
typeof(BasicManagementEntityFrameworkCoreModule), |
||||
|
typeof(BasicManagementHttpApiModule), |
||||
|
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), |
||||
|
typeof(AbpAutofacModule), |
||||
|
typeof(AbpCachingStackExchangeRedisModule), |
||||
|
typeof(AbpEntityFrameworkCoreMySQLModule), |
||||
|
typeof(AbpAspNetCoreSerilogModule), |
||||
|
typeof(AbpSwashbuckleModule), |
||||
|
typeof(SharedHostingMicroserviceModule) |
||||
|
)] |
||||
|
public class BasicManagementHttpApiHostModule : AbpModule |
||||
|
{ |
||||
|
private const string DefaultCorsPolicyName = "Default"; |
||||
|
|
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
ConfigureCache(context); |
||||
|
ConfigureSwaggerServices(context); |
||||
|
ConfigureJwtAuthentication(context); |
||||
|
Configure<AbpDbContextOptions>(options => { options.UseMySQL(); }); |
||||
|
Configure<AbpExceptionHandlingOptions>(options => |
||||
|
{ |
||||
|
options.SendExceptionsDetailsToClients = false; |
||||
|
}); |
||||
|
ConfigureVirtualFileSystem(context); |
||||
|
} |
||||
|
|
||||
|
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
||||
|
{ |
||||
|
var app = context.GetApplicationBuilder(); |
||||
|
|
||||
|
app.UseCorrelationId(); |
||||
|
app.UseStaticFiles(); |
||||
|
app.UseRouting(); |
||||
|
app.UseCors(); |
||||
|
app.UseAuthentication(); |
||||
|
app.UseMultiTenancy(); |
||||
|
app.UseAbpRequestLocalization(); |
||||
|
app.UseAuthorization(); |
||||
|
app.UseSwagger(); |
||||
|
app.UseAbpSwaggerUI(options => |
||||
|
{ |
||||
|
options.SwaggerEndpoint("/swagger/BasicManagement/swagger.json", "BasicManagement API"); |
||||
|
options.DocExpansion(DocExpansion.None); |
||||
|
options.DefaultModelsExpandDepth(-1); |
||||
|
}); |
||||
|
app.UseAuditing(); |
||||
|
app.UseAbpSerilogEnrichers(); |
||||
|
app.UseConfiguredEndpoints(); |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 配置虚拟文件系统
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpVirtualFileSystemOptions>(options => |
||||
|
{ |
||||
|
options.FileSets.AddEmbedded<BasicManagementHttpApiHostModule>(); |
||||
|
}); |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// Redis缓存
|
||||
|
/// </summary>
|
||||
|
private void ConfigureCache(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpDistributedCacheOptions>( |
||||
|
options => { options.KeyPrefix = "AbpPro:"; }); |
||||
|
var configuration = context.Services.GetConfiguration(); |
||||
|
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); |
||||
|
context.Services |
||||
|
.AddDataProtection() |
||||
|
.PersistKeysToStackExchangeRedis(redis, "AbpPro-Protection-Keys"); |
||||
|
} |
||||
|
|
||||
|
private static void ConfigureSwaggerServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
context.Services.AddSwaggerGen( |
||||
|
options => |
||||
|
{ |
||||
|
// 文件下载类型
|
||||
|
options.MapType<FileContentResult>(() => new OpenApiSchema() { Type = "file" }); |
||||
|
|
||||
|
options.SwaggerDoc("BasicManagement", |
||||
|
new OpenApiInfo { Title = "BasicManagement API", Version = "v1" }); |
||||
|
options.DocInclusionPredicate((docName, description) => true); |
||||
|
options.EnableAnnotations(); // 启用注解
|
||||
|
options.DocumentFilter<HiddenAbpDefaultApiFilter>(); |
||||
|
options.SchemaFilter<EnumSchemaFilter>(); |
||||
|
// 加载所有xml注释,这里会导致swagger加载有点缓慢
|
||||
|
var xmlPaths = Directory.GetFiles(AppContext.BaseDirectory, "*.xml"); |
||||
|
foreach (var xml in xmlPaths) |
||||
|
{ |
||||
|
options.IncludeXmlComments(xml, true); |
||||
|
} |
||||
|
|
||||
|
options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, |
||||
|
new OpenApiSecurityScheme() |
||||
|
{ |
||||
|
Description = "直接在下框输入JWT生成的Token", |
||||
|
Name = "Authorization", |
||||
|
In = ParameterLocation.Header, |
||||
|
Type = SecuritySchemeType.Http, |
||||
|
Scheme = JwtBearerDefaults.AuthenticationScheme, |
||||
|
BearerFormat = "JWT" |
||||
|
}); |
||||
|
options.AddSecurityRequirement(new OpenApiSecurityRequirement |
||||
|
{ |
||||
|
{ |
||||
|
new OpenApiSecurityScheme |
||||
|
{ |
||||
|
Reference = new OpenApiReference |
||||
|
{ |
||||
|
Type = ReferenceType.SecurityScheme, Id = "Bearer" |
||||
|
} |
||||
|
}, |
||||
|
new List<string>() |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme() |
||||
|
{ |
||||
|
Type = SecuritySchemeType.ApiKey, |
||||
|
In = ParameterLocation.Header, |
||||
|
Name = "Accept-Language", |
||||
|
Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans", |
||||
|
}); |
||||
|
|
||||
|
options.AddSecurityRequirement(new OpenApiSecurityRequirement |
||||
|
{ |
||||
|
{ |
||||
|
new OpenApiSecurityScheme |
||||
|
{ |
||||
|
Reference = new OpenApiReference |
||||
|
{ Type = ReferenceType.SecurityScheme, Id = "ApiKey" } |
||||
|
}, |
||||
|
Array.Empty<string>() |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 配置JWT
|
||||
|
/// </summary>
|
||||
|
private void ConfigureJwtAuthentication(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
var configuration = context.Services.GetConfiguration(); |
||||
|
context.Services.AddAuthentication(options => |
||||
|
{ |
||||
|
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; |
||||
|
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; |
||||
|
}) |
||||
|
.AddJwtBearer(options => |
||||
|
{ |
||||
|
options.TokenValidationParameters = |
||||
|
new TokenValidationParameters() |
||||
|
{ |
||||
|
// 是否开启签名认证
|
||||
|
ValidateIssuerSigningKey = true, |
||||
|
ValidateIssuer = true, |
||||
|
ValidateAudience = true, |
||||
|
ValidateLifetime = true, |
||||
|
//ClockSkew = TimeSpan.Zero,
|
||||
|
ValidIssuer = configuration["Jwt:Issuer"], |
||||
|
ValidAudience = configuration["Jwt:Audience"], |
||||
|
IssuerSigningKey = |
||||
|
new SymmetricSecurityKey( |
||||
|
Encoding.ASCII.GetBytes(configuration["Jwt:SecurityKey"])) |
||||
|
}; |
||||
|
|
||||
|
options.Events = new JwtBearerEvents |
||||
|
{ |
||||
|
OnMessageReceived = currentContext => |
||||
|
{ |
||||
|
var path = currentContext.HttpContext.Request.Path; |
||||
|
if (path.StartsWithSegments("/login")) |
||||
|
{ |
||||
|
return Task.CompletedTask; |
||||
|
} |
||||
|
|
||||
|
var accessToken = string.Empty; |
||||
|
if (currentContext.HttpContext.Request.Headers.ContainsKey("Authorization")) |
||||
|
{ |
||||
|
accessToken = currentContext.HttpContext.Request.Headers["Authorization"]; |
||||
|
if (!string.IsNullOrWhiteSpace(accessToken)) |
||||
|
{ |
||||
|
accessToken = accessToken.Split(" ").LastOrDefault(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (accessToken.IsNullOrWhiteSpace()) |
||||
|
{ |
||||
|
accessToken = currentContext.Request.Query["access_token"].FirstOrDefault(); |
||||
|
} |
||||
|
|
||||
|
if (accessToken.IsNullOrWhiteSpace()) |
||||
|
{ |
||||
|
accessToken = currentContext.Request.Cookies[DefaultCorsPolicyName]; |
||||
|
} |
||||
|
|
||||
|
currentContext.Token = accessToken; |
||||
|
currentContext.Request.Headers.Remove("Authorization"); |
||||
|
currentContext.Request.Headers.Add("Authorization", $"Bearer {accessToken}"); |
||||
|
|
||||
|
return Task.CompletedTask; |
||||
|
} |
||||
|
}; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Controllers; |
||||
|
|
||||
|
public class HomeController : AbpController |
||||
|
{ |
||||
|
public ActionResult Index() |
||||
|
{ |
||||
|
return Redirect("~/swagger"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base |
||||
|
WORKDIR /app |
||||
|
EXPOSE 80 |
||||
|
|
||||
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build |
||||
|
WORKDIR /src |
||||
|
COPY . . |
||||
|
WORKDIR /src/templates/service/host/Lion.AbpPro.BasicManagement.HttpApi.Host |
||||
|
RUN dotnet restore -nowarn:msb3202,nu1503 |
||||
|
RUN dotnet build --no-restore -c Release -o /app |
||||
|
|
||||
|
FROM build AS publish |
||||
|
RUN dotnet publish --no-restore -c Release -o /app |
||||
|
|
||||
|
FROM base AS final |
||||
|
WORKDIR /app |
||||
|
COPY --from=publish /app . |
||||
|
ENTRYPOINT ["dotnet", "Lion.AbpPro.BasicManagement.HttpApi.Host.dll"] |
||||
@ -0,0 +1,20 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.EntityFrameworkCore; |
||||
|
|
||||
|
public class BasicManagementHttpApiHostMigrationsDbContext : AbpDbContext<BasicManagementHttpApiHostMigrationsDbContext> |
||||
|
{ |
||||
|
public BasicManagementHttpApiHostMigrationsDbContext(DbContextOptions<BasicManagementHttpApiHostMigrationsDbContext> options) |
||||
|
: base(options) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
|
||||
|
modelBuilder.ConfigureBasicManagement(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
using System.IO; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Design; |
||||
|
using Microsoft.Extensions.Configuration; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.EntityFrameworkCore; |
||||
|
|
||||
|
public class BasicManagementHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<BasicManagementHttpApiHostMigrationsDbContext> |
||||
|
{ |
||||
|
public BasicManagementHttpApiHostMigrationsDbContext CreateDbContext(string[] args) |
||||
|
{ |
||||
|
var configuration = BuildConfiguration(); |
||||
|
|
||||
|
var builder = new DbContextOptionsBuilder<BasicManagementHttpApiHostMigrationsDbContext>() |
||||
|
.UseMySql(configuration.GetConnectionString("Default"), MySqlServerVersion.LatestSupportedServerVersion); |
||||
|
|
||||
|
return new BasicManagementHttpApiHostMigrationsDbContext(builder.Options); |
||||
|
} |
||||
|
|
||||
|
private static IConfigurationRoot BuildConfiguration() |
||||
|
{ |
||||
|
var builder = new ConfigurationBuilder() |
||||
|
.SetBasePath(Directory.GetCurrentDirectory()) |
||||
|
.AddJsonFile("appsettings.json", optional: false); |
||||
|
|
||||
|
return builder.Build(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,43 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net6.0</TargetFramework> |
||||
|
<RootNamespace>Lion.AbpPro.BasicManagement</RootNamespace> |
||||
|
<PreserveCompilationReferences>true</PreserveCompilationReferences> |
||||
|
<UserSecretsId>Lion.AbpPro.BasicManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010</UserSecretsId> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Serilog.AspNetCore" /> |
||||
|
<PackageReference Include="Serilog.Sinks.Async" /> |
||||
|
<PackageReference Include="IdentityModel" /> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" /> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" /> |
||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" /> |
||||
|
<PackageReference Include="Volo.Abp.Autofac" /> |
||||
|
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" /> |
||||
|
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" /> |
||||
|
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" /> |
||||
|
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" /> |
||||
|
<PackageReference Include="Volo.Abp.Swashbuckle" /> |
||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" /> |
||||
|
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" /> |
||||
|
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" /> |
||||
|
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\..\..\..\shared\Lion.AbpPro.Shared.Hosting.Microservices\Lion.AbpPro.Shared.Hosting.Microservices.csproj" /> |
||||
|
<ProjectReference Include="..\..\src\Lion.AbpPro.BasicManagement.HttpApi\Lion.AbpPro.BasicManagement.HttpApi.csproj" /> |
||||
|
<ProjectReference Include="..\..\src\Lion.AbpPro.BasicManagement.Application\Lion.AbpPro.BasicManagement.Application.csproj" /> |
||||
|
<ProjectReference Include="..\..\src\Lion.AbpPro.BasicManagement.EntityFrameworkCore\Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<Compile Remove="Logs\**" /> |
||||
|
<Content Remove="Logs\**" /> |
||||
|
<EmbeddedResource Remove="Logs\**" /> |
||||
|
<None Remove="Logs\**" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
File diff suppressed because it is too large
@ -0,0 +1,194 @@ |
|||||
|
2022-08-24 13:26:53.260 +08:00 [INF] Loaded ABP modules: |
||||
|
2022-08-24 13:26:53.307 +08:00 [INF] - Lion.AbpPro.BasicManagement.BasicManagementHttpApiHostModule |
||||
|
2022-08-24 13:26:53.308 +08:00 [INF] - Lion.AbpPro.BasicManagement.BasicManagementApplicationModule |
||||
|
2022-08-24 13:26:53.309 +08:00 [INF] - Lion.AbpPro.BasicManagement.BasicManagementDomainModule |
||||
|
2022-08-24 13:26:53.309 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule |
||||
|
2022-08-24 13:26:53.310 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule |
||||
|
2022-08-24 13:26:53.311 +08:00 [INF] - Volo.Abp.Data.AbpDataModule |
||||
|
2022-08-24 13:26:53.311 +08:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule |
||||
|
2022-08-24 13:26:53.312 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule |
||||
|
2022-08-24 13:26:53.328 +08:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule |
||||
|
2022-08-24 13:26:53.330 +08:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule |
||||
|
2022-08-24 13:26:53.332 +08:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule |
||||
|
2022-08-24 13:26:53.333 +08:00 [INF] - Volo.Abp.Json.AbpJsonModule |
||||
|
2022-08-24 13:26:53.333 +08:00 [INF] - Volo.Abp.Timing.AbpTimingModule |
||||
|
2022-08-24 13:26:53.334 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule |
||||
|
2022-08-24 13:26:53.335 +08:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule |
||||
|
2022-08-24 13:26:53.336 +08:00 [INF] - Volo.Abp.Settings.AbpSettingsModule |
||||
|
2022-08-24 13:26:53.336 +08:00 [INF] - Volo.Abp.Security.AbpSecurityModule |
||||
|
2022-08-24 13:26:53.337 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule |
||||
|
2022-08-24 13:26:53.338 +08:00 [INF] - Volo.Abp.Threading.AbpThreadingModule |
||||
|
2022-08-24 13:26:53.338 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule |
||||
|
2022-08-24 13:26:53.339 +08:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule |
||||
|
2022-08-24 13:26:53.340 +08:00 [INF] - Volo.Abp.Guids.AbpGuidsModule |
||||
|
2022-08-24 13:26:53.340 +08:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule |
||||
|
2022-08-24 13:26:53.341 +08:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule |
||||
|
2022-08-24 13:26:53.342 +08:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule |
||||
|
2022-08-24 13:26:53.343 +08:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule |
||||
|
2022-08-24 13:26:53.344 +08:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule |
||||
|
2022-08-24 13:26:53.345 +08:00 [INF] - Lion.AbpPro.BasicManagement.BasicManagementDomainSharedModule |
||||
|
2022-08-24 13:26:53.346 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainSharedModule |
||||
|
2022-08-24 13:26:53.348 +08:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsDomainSharedModule |
||||
|
2022-08-24 13:26:53.357 +08:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementDomainSharedModule |
||||
|
2022-08-24 13:26:53.359 +08:00 [INF] - Volo.Abp.Validation.AbpValidationModule |
||||
|
2022-08-24 13:26:53.365 +08:00 [INF] - Volo.Abp.Identity.AbpIdentityDomainSharedModule |
||||
|
2022-08-24 13:26:53.377 +08:00 [INF] - Volo.Abp.Users.AbpUsersDomainSharedModule |
||||
|
2022-08-24 13:26:53.383 +08:00 [INF] - Volo.Abp.Features.AbpFeaturesModule |
||||
|
2022-08-24 13:26:53.385 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule |
||||
|
2022-08-24 13:26:53.392 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainSharedModule |
||||
|
2022-08-24 13:26:53.405 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainSharedModule |
||||
|
2022-08-24 13:26:53.430 +08:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementDomainSharedModule |
||||
|
2022-08-24 13:26:53.449 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainModule |
||||
|
2022-08-24 13:26:53.460 +08:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsDomainModule |
||||
|
2022-08-24 13:26:53.466 +08:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsModule |
||||
|
2022-08-24 13:26:53.468 +08:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsAbstractionsModule |
||||
|
2022-08-24 13:26:53.470 +08:00 [INF] - Volo.Abp.AutoMapper.AbpAutoMapperModule |
||||
|
2022-08-24 13:26:53.474 +08:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementDomainModule |
||||
|
2022-08-24 13:26:53.478 +08:00 [INF] - Volo.Abp.Caching.AbpCachingModule |
||||
|
2022-08-24 13:26:53.479 +08:00 [INF] - Volo.Abp.Serialization.AbpSerializationModule |
||||
|
2022-08-24 13:26:53.480 +08:00 [INF] - Volo.Abp.Identity.AbpIdentityDomainModule |
||||
|
2022-08-24 13:26:53.481 +08:00 [INF] - Volo.Abp.Users.AbpUsersDomainModule |
||||
|
2022-08-24 13:26:53.482 +08:00 [INF] - Volo.Abp.Users.AbpUsersAbstractionModule |
||||
|
2022-08-24 13:26:53.483 +08:00 [INF] - Volo.Abp.PermissionManagement.Identity.AbpPermissionManagementDomainIdentityModule |
||||
|
2022-08-24 13:26:53.484 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainModule |
||||
|
2022-08-24 13:26:53.485 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule |
||||
|
2022-08-24 13:26:53.487 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainModule |
||||
|
2022-08-24 13:26:53.489 +08:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementDomainModule |
||||
|
2022-08-24 13:26:53.498 +08:00 [INF] - Lion.AbpPro.BasicManagement.BasicManagementApplicationContractsModule |
||||
|
2022-08-24 13:26:53.499 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule |
||||
|
2022-08-24 13:26:53.500 +08:00 [INF] - Volo.Abp.Account.AbpAccountApplicationContractsModule |
||||
|
2022-08-24 13:26:53.501 +08:00 [INF] - Volo.Abp.Identity.AbpIdentityApplicationContractsModule |
||||
|
2022-08-24 13:26:53.503 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementApplicationContractsModule |
||||
|
2022-08-24 13:26:53.504 +08:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementApplicationContractsModule |
||||
|
2022-08-24 13:26:53.505 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementApplicationContractsModule |
||||
|
2022-08-24 13:26:53.510 +08:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementApplicationContractsModule |
||||
|
2022-08-24 13:26:53.511 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule |
||||
|
2022-08-24 13:26:53.512 +08:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule |
||||
|
2022-08-24 13:26:53.514 +08:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule |
||||
|
2022-08-24 13:26:53.516 +08:00 [INF] - Volo.Abp.Identity.AspNetCore.AbpIdentityAspNetCoreModule |
||||
|
2022-08-24 13:26:53.517 +08:00 [INF] - Volo.Abp.Account.AbpAccountApplicationModule |
||||
|
2022-08-24 13:26:53.518 +08:00 [INF] - Volo.Abp.Identity.AbpIdentityApplicationModule |
||||
|
2022-08-24 13:26:53.529 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementApplicationModule |
||||
|
2022-08-24 13:26:53.531 +08:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule |
||||
|
2022-08-24 13:26:53.532 +08:00 [INF] - Volo.Abp.UI.AbpUiModule |
||||
|
2022-08-24 13:26:53.533 +08:00 [INF] - Volo.Abp.Emailing.AbpEmailingModule |
||||
|
2022-08-24 13:26:53.534 +08:00 [INF] - Volo.Abp.TextTemplating.AbpTextTemplatingModule |
||||
|
2022-08-24 13:26:53.535 +08:00 [INF] - Volo.Abp.TextTemplating.Scriban.AbpTextTemplatingScribanModule |
||||
|
2022-08-24 13:26:53.536 +08:00 [INF] - Volo.Abp.TextTemplating.AbpTextTemplatingCoreModule |
||||
|
2022-08-24 13:26:53.537 +08:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementApplicationModule |
||||
|
2022-08-24 13:26:53.542 +08:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementApplicationModule |
||||
|
2022-08-24 13:26:53.543 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementApplicationModule |
||||
|
2022-08-24 13:26:53.544 +08:00 [INF] - Lion.AbpPro.BasicManagement.EntityFrameworkCore.BasicManagementEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.545 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.547 +08:00 [INF] - Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.548 +08:00 [INF] - Volo.Abp.Users.EntityFrameworkCore.AbpUsersEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.549 +08:00 [INF] - Volo.Abp.PermissionManagement.EntityFrameworkCore.AbpPermissionManagementEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.549 +08:00 [INF] - Volo.Abp.SettingManagement.EntityFrameworkCore.AbpSettingManagementEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.550 +08:00 [INF] - Volo.Abp.BackgroundJobs.EntityFrameworkCore.AbpBackgroundJobsEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.551 +08:00 [INF] - Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.552 +08:00 [INF] - Volo.Abp.TenantManagement.EntityFrameworkCore.AbpTenantManagementEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.559 +08:00 [INF] - Volo.Abp.FeatureManagement.EntityFrameworkCore.AbpFeatureManagementEntityFrameworkCoreModule |
||||
|
2022-08-24 13:26:53.561 +08:00 [INF] - Lion.AbpPro.BasicManagement.BasicManagementHttpApiModule |
||||
|
2022-08-24 13:26:53.563 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule |
||||
|
2022-08-24 13:26:53.564 +08:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule |
||||
|
2022-08-24 13:26:53.565 +08:00 [INF] - Volo.Abp.Http.AbpHttpModule |
||||
|
2022-08-24 13:26:53.566 +08:00 [INF] - Volo.Abp.Minify.AbpMinifyModule |
||||
|
2022-08-24 13:26:53.566 +08:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule |
||||
|
2022-08-24 13:26:53.567 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule |
||||
|
2022-08-24 13:26:53.568 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.AbpAspNetCoreMvcUiMultiTenancyModule |
||||
|
2022-08-24 13:26:53.572 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.AbpAspNetCoreMvcUiThemeSharedModule |
||||
|
2022-08-24 13:26:53.572 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.AbpAspNetCoreMvcUiBootstrapModule |
||||
|
2022-08-24 13:26:53.573 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.AbpAspNetCoreMvcUiModule |
||||
|
2022-08-24 13:26:53.574 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Packages.AbpAspNetCoreMvcUiPackagesModule |
||||
|
2022-08-24 13:26:53.575 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingAbstractionsModule |
||||
|
2022-08-24 13:26:53.576 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpAspNetCoreMvcUiWidgetsModule |
||||
|
2022-08-24 13:26:53.577 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingModule |
||||
|
2022-08-24 13:26:53.578 +08:00 [INF] - Volo.Abp.AspNetCore.MultiTenancy.AbpAspNetCoreMultiTenancyModule |
||||
|
2022-08-24 13:26:53.579 +08:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule |
||||
|
2022-08-24 13:26:53.580 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule |
||||
|
2022-08-24 13:26:53.581 +08:00 [INF] - Volo.Abp.Caching.StackExchangeRedis.AbpCachingStackExchangeRedisModule |
||||
|
2022-08-24 13:26:53.582 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.MySQL.AbpEntityFrameworkCoreMySQLModule |
||||
|
2022-08-24 13:26:53.586 +08:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule |
||||
|
2022-08-24 13:26:53.586 +08:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule |
||||
|
2022-08-24 13:26:55.071 +08:00 [INF] Initialized all ABP modules. |
||||
|
2022-08-24 13:26:55.132 +08:00 [INF] Now listening on: http://localhost:44324 |
||||
|
2022-08-24 13:26:55.135 +08:00 [INF] Application started. Press Ctrl+C to shut down. |
||||
|
2022-08-24 13:26:55.137 +08:00 [INF] Hosting environment: Development |
||||
|
2022-08-24 13:26:55.138 +08:00 [INF] Content root path: D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\BasicManagement\host\Lion.AbpPro.BasicManagement.HttpApi.Host |
||||
|
2022-08-24 13:26:55.302 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44324/ - - |
||||
|
2022-08-24 13:26:59.596 +08:00 [INF] Executing endpoint 'Lion.AbpPro.BasicManagement.Controllers.HomeController.Index (Lion.AbpPro.BasicManagement.HttpApi.Host)' |
||||
|
2022-08-24 13:26:59.625 +08:00 [INF] Route matched with {action = "Index", controller = "Home", area = "", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult Index() on controller Lion.AbpPro.BasicManagement.Controllers.HomeController (Lion.AbpPro.BasicManagement.HttpApi.Host). |
||||
|
2022-08-24 13:26:59.664 +08:00 [INF] Executing RedirectResult, redirecting to /swagger. |
||||
|
2022-08-24 13:26:59.672 +08:00 [INF] Executed action Lion.AbpPro.BasicManagement.Controllers.HomeController.Index (Lion.AbpPro.BasicManagement.HttpApi.Host) in 40.2794ms |
||||
|
2022-08-24 13:26:59.684 +08:00 [INF] Executed endpoint 'Lion.AbpPro.BasicManagement.Controllers.HomeController.Index (Lion.AbpPro.BasicManagement.HttpApi.Host)' |
||||
|
2022-08-24 13:26:59.721 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44324/ - - - 302 0 - 4419.2778ms |
||||
|
2022-08-24 13:26:59.733 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44324/swagger - - |
||||
|
2022-08-24 13:26:59.739 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44324/swagger - - - 301 0 - 6.0422ms |
||||
|
2022-08-24 13:26:59.746 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44324/swagger/index.html - - |
||||
|
2022-08-24 13:26:59.798 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44324/swagger/index.html - - - 200 - text/html;charset=utf-8 52.2946ms |
||||
|
2022-08-24 13:27:00.125 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44324/swagger/BasicManagement/swagger.json - - |
||||
|
2022-08-24 13:27:00.451 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44324/swagger/BasicManagement/swagger.json - - - 200 - application/json;charset=utf-8 326.7641ms |
||||
|
2022-08-24 13:27:10.772 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44324/abp/Swashbuckle/SetCsrfCookie application/json - |
||||
|
2022-08-24 13:27:10.775 +08:00 [INF] Executing endpoint 'Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle)' |
||||
|
2022-08-24 13:27:10.779 +08:00 [INF] Route matched with {area = "Abp", action = "SetCsrfCookie", controller = "AbpSwashbuckle", page = ""}. Executing controller action with signature Void SetCsrfCookie() on controller Volo.Abp.Swashbuckle.AbpSwashbuckleController (Volo.Abp.Swashbuckle). |
||||
|
2022-08-24 13:27:10.792 +08:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'. |
||||
|
2022-08-24 13:27:10.794 +08:00 [INF] Executed action Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle) in 13.0704ms |
||||
|
2022-08-24 13:27:10.795 +08:00 [INF] Executed endpoint 'Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle)' |
||||
|
2022-08-24 13:27:10.796 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44324/abp/Swashbuckle/SetCsrfCookie application/json - - 204 - - 24.2157ms |
||||
|
2022-08-24 13:27:10.835 +08:00 [INF] Request starting HTTP/1.1 POST http://localhost:44324/api/app/account/login application/json 46 |
||||
|
2022-08-24 13:27:10.838 +08:00 [INF] No CORS policy found for the specified request. |
||||
|
2022-08-24 13:27:10.840 +08:00 [INF] Executing endpoint 'Lion.AbpPro.BasicManagement.Systems.AccountController.LoginAsync (Lion.AbpPro.BasicManagement.HttpApi)' |
||||
|
2022-08-24 13:27:10.852 +08:00 [INF] Route matched with {action = "Login", controller = "Account", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Lion.AbpPro.BasicManagement.Users.Dtos.LoginOutput] LoginAsync(Lion.AbpPro.BasicManagement.Users.Dtos.LoginInput) on controller Lion.AbpPro.BasicManagement.Systems.AccountController (Lion.AbpPro.BasicManagement.HttpApi). |
||||
|
2022-08-24 13:27:10.869 +08:00 [ERR] The antiforgery token could not be decrypted. |
||||
|
2022-08-24 13:27:10.871 +08:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. |
||||
|
2022-08-24 13:27:10.875 +08:00 [INF] Executing StatusCodeResult, setting HTTP status code 400 |
||||
|
2022-08-24 13:27:10.876 +08:00 [INF] Executed action Lion.AbpPro.BasicManagement.Systems.AccountController.LoginAsync (Lion.AbpPro.BasicManagement.HttpApi) in 23.3032ms |
||||
|
2022-08-24 13:27:10.877 +08:00 [INF] Executed endpoint 'Lion.AbpPro.BasicManagement.Systems.AccountController.LoginAsync (Lion.AbpPro.BasicManagement.HttpApi)' |
||||
|
2022-08-24 13:27:11.232 +08:00 [INF] Request finished HTTP/1.1 POST http://localhost:44324/api/app/account/login application/json 46 - 400 0 - 397.1138ms |
||||
|
2022-08-24 13:27:21.937 +08:00 [INF] Request starting HTTP/1.1 POST http://localhost:44324/api/app/account/login application/json 46 |
||||
|
2022-08-24 13:27:21.939 +08:00 [INF] No CORS policy found for the specified request. |
||||
|
2022-08-24 13:27:21.941 +08:00 [INF] Executing endpoint 'Lion.AbpPro.BasicManagement.Systems.AccountController.LoginAsync (Lion.AbpPro.BasicManagement.HttpApi)' |
||||
|
2022-08-24 13:27:21.942 +08:00 [INF] Route matched with {action = "Login", controller = "Account", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Lion.AbpPro.BasicManagement.Users.Dtos.LoginOutput] LoginAsync(Lion.AbpPro.BasicManagement.Users.Dtos.LoginInput) on controller Lion.AbpPro.BasicManagement.Systems.AccountController (Lion.AbpPro.BasicManagement.HttpApi). |
||||
|
2022-08-24 13:27:23.234 +08:00 [WRN] ---------- RemoteServiceErrorInfo ---------- |
||||
|
{ |
||||
|
"code": "Lion.AbpPro.BasicManagement:100003", |
||||
|
"message": "用户名或者密码错误", |
||||
|
"details": null, |
||||
|
"data": {}, |
||||
|
"validationErrors": null |
||||
|
} |
||||
|
|
||||
|
2022-08-24 13:27:23.238 +08:00 [WRN] Exception of type 'Volo.Abp.BusinessException' was thrown. |
||||
|
Volo.Abp.BusinessException: Exception of type 'Volo.Abp.BusinessException' was thrown. |
||||
|
at Lion.AbpPro.BasicManagement.Users.AccountAppService.LoginAsync(LoginInput input) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Application\Users\AccountAppService.cs:line 39 |
||||
|
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() |
||||
|
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) |
||||
|
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() |
||||
|
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) |
||||
|
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() |
||||
|
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) |
||||
|
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) |
||||
|
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() |
||||
|
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) |
||||
|
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) |
||||
|
at lambda_method1387(Closure , Object ) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) |
||||
|
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) |
||||
|
2022-08-24 13:27:23.297 +08:00 [WRN] Code:Lion.AbpPro.BasicManagement:100003 |
||||
|
2022-08-24 13:27:23.298 +08:00 [WRN] Details: |
||||
|
2022-08-24 13:27:23.313 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. |
||||
|
2022-08-24 13:27:23.322 +08:00 [INF] Executed action Lion.AbpPro.BasicManagement.Systems.AccountController.LoginAsync (Lion.AbpPro.BasicManagement.HttpApi) in 1378.6532ms |
||||
|
2022-08-24 13:27:23.327 +08:00 [INF] Executed endpoint 'Lion.AbpPro.BasicManagement.Systems.AccountController.LoginAsync (Lion.AbpPro.BasicManagement.HttpApi)' |
||||
|
2022-08-24 13:27:23.401 +08:00 [INF] Request finished HTTP/1.1 POST http://localhost:44324/api/app/account/login application/json 46 - 403 - application/json;+charset=utf-8 1463.5504ms |
||||
@ -0,0 +1,16 @@ |
|||||
|
2022-08-23 22:11:33.863 +08:00 [INF] Starting web host. |
||||
|
2022-08-23 22:11:39.197 +08:00 [FTL] Host terminated unexpectedly! |
||||
|
Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException: Exception of type 'Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException' was thrown. |
||||
|
at Microsoft.Extensions.Hosting.HostFactoryResolver.HostingListener.OnNext(KeyValuePair`2 value) |
||||
|
at System.Diagnostics.DiagnosticListener.Write(String name, Object value) |
||||
|
at Microsoft.Extensions.Hosting.HostBuilder.Build() |
||||
|
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build() |
||||
|
at Lion.AbpPro.BasicManagement.Program.Main(String[] args) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\BasicManagement\host\Lion.AbpPro.BasicManagement.HttpApi.Host\Program.cs:line 36 |
||||
|
2022-08-23 22:13:21.209 +08:00 [INF] Starting web host. |
||||
|
2022-08-23 22:13:22.124 +08:00 [FTL] Host terminated unexpectedly! |
||||
|
Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException: Exception of type 'Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException' was thrown. |
||||
|
at Microsoft.Extensions.Hosting.HostFactoryResolver.HostingListener.OnNext(KeyValuePair`2 value) |
||||
|
at System.Diagnostics.DiagnosticListener.Write(String name, Object value) |
||||
|
at Microsoft.Extensions.Hosting.HostBuilder.Build() |
||||
|
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build() |
||||
|
at Lion.AbpPro.BasicManagement.Program.Main(String[] args) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\BasicManagement\host\Lion.AbpPro.BasicManagement.HttpApi.Host\Program.cs:line 36 |
||||
File diff suppressed because it is too large
@ -0,0 +1,880 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Migrations |
||||
|
{ |
||||
|
public partial class Init : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AlterDatabase() |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuditLogs", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
ApplicationName = table.Column<string>(type: "varchar(96)", maxLength: 96, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
TenantName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ImpersonatorUserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ImpersonatorUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ImpersonatorTenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ImpersonatorTenantName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ExecutionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ExecutionDuration = table.Column<int>(type: "int", nullable: false), |
||||
|
ClientIpAddress = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ClientName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ClientId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CorrelationId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
BrowserInfo = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
HttpMethod = table.Column<string>(type: "varchar(16)", maxLength: 16, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Url = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Exceptions = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Comments = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
HttpStatusCode = table.Column<int>(type: "int", nullable: true), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpBackgroundJobs", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
JobName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
JobArgs = table.Column<string>(type: "longtext", maxLength: 1048576, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
TryCount = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)0), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
NextTryTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
LastTryTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
IsAbandoned = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
Priority = table.Column<byte>(type: "tinyint unsigned", nullable: false, defaultValue: (byte)15), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpClaimTypes", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Required = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
IsStatic = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
Regex = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
RegexDescription = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Description = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ValueType = table.Column<int>(type: "int", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpFeatureValues", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Value = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderKey = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpLinkUsers", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
SourceUserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
SourceTenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
TargetUserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TargetTenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpOrganizationUnits", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ParentId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Code = table.Column<string>(type: "varchar(95)", maxLength: 95, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
DisplayName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", |
||||
|
column: x => x.ParentId, |
||||
|
principalTable: "AbpOrganizationUnits", |
||||
|
principalColumn: "Id"); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpPermissionGrants", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderKey = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpRoles", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
NormalizedName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
IsDefault = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
IsStatic = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
IsPublic = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpRoles", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpSecurityLogs", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ApplicationName = table.Column<string>(type: "varchar(96)", maxLength: 96, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Identity = table.Column<string>(type: "varchar(96)", maxLength: 96, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Action = table.Column<string>(type: "varchar(96)", maxLength: 96, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
TenantName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ClientId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CorrelationId = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ClientIpAddress = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
BrowserInfo = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpSettings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Value = table.Column<string>(type: "varchar(2048)", maxLength: 2048, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderKey = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpTenants", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpTenants", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUsers", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
NormalizedUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Surname = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Email = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
NormalizedEmail = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
EmailConfirmed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
PasswordHash = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
SecurityStamp = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
IsExternal = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
PhoneNumber = table.Column<string>(type: "varchar(16)", maxLength: 16, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
PhoneNumberConfirmed = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
TwoFactorEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
LockoutEnd = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: true), |
||||
|
LockoutEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
AccessFailedCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
||||
|
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUsers", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuditLogActions", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
AuditLogId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
ServiceName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
MethodName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Parameters = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ExecutionTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ExecutionDuration = table.Column<int>(type: "int", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", |
||||
|
column: x => x.AuditLogId, |
||||
|
principalTable: "AbpAuditLogs", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpEntityChanges", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
AuditLogId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ChangeTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
ChangeType = table.Column<byte>(type: "tinyint unsigned", nullable: false), |
||||
|
EntityTenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
EntityId = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
EntityTypeFullName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", |
||||
|
column: x => x.AuditLogId, |
||||
|
principalTable: "AbpAuditLogs", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpOrganizationUnitRoles", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
RoleId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
OrganizationUnitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUn~", |
||||
|
column: x => x.OrganizationUnitId, |
||||
|
principalTable: "AbpOrganizationUnits", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", |
||||
|
column: x => x.RoleId, |
||||
|
principalTable: "AbpRoles", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpRoleClaims", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
RoleId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ClaimType = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ClaimValue = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpRoleClaims_AbpRoles_RoleId", |
||||
|
column: x => x.RoleId, |
||||
|
principalTable: "AbpRoles", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpTenantConnectionStrings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Value = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", |
||||
|
column: x => x.TenantId, |
||||
|
principalTable: "AbpTenants", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUserClaims", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ClaimType = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ClaimValue = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUserClaims", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserClaims_AbpUsers_UserId", |
||||
|
column: x => x.UserId, |
||||
|
principalTable: "AbpUsers", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUserLogins", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
LoginProvider = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
ProviderKey = table.Column<string>(type: "varchar(196)", maxLength: 196, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ProviderDisplayName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserLogins_AbpUsers_UserId", |
||||
|
column: x => x.UserId, |
||||
|
principalTable: "AbpUsers", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUserOrganizationUnits", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
OrganizationUnitId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUn~", |
||||
|
column: x => x.OrganizationUnitId, |
||||
|
principalTable: "AbpOrganizationUnits", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", |
||||
|
column: x => x.UserId, |
||||
|
principalTable: "AbpUsers", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUserRoles", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
RoleId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserRoles_AbpRoles_RoleId", |
||||
|
column: x => x.RoleId, |
||||
|
principalTable: "AbpRoles", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserRoles_AbpUsers_UserId", |
||||
|
column: x => x.UserId, |
||||
|
principalTable: "AbpUsers", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUserTokens", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
LoginProvider = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Value = table.Column<string>(type: "longtext", nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserTokens_AbpUsers_UserId", |
||||
|
column: x => x.UserId, |
||||
|
principalTable: "AbpUsers", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpEntityPropertyChanges", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
EntityChangeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
NewValue = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
OriginalValue = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
PropertyName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
PropertyTypeFullName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", |
||||
|
column: x => x.EntityChangeId, |
||||
|
principalTable: "AbpEntityChanges", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogActions_AuditLogId", |
||||
|
table: "AbpAuditLogActions", |
||||
|
column: "AuditLogId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Execution~", |
||||
|
table: "AbpAuditLogActions", |
||||
|
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogs_TenantId_ExecutionTime", |
||||
|
table: "AbpAuditLogs", |
||||
|
columns: new[] { "TenantId", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", |
||||
|
table: "AbpAuditLogs", |
||||
|
columns: new[] { "TenantId", "UserId", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", |
||||
|
table: "AbpBackgroundJobs", |
||||
|
columns: new[] { "IsAbandoned", "NextTryTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityChanges_AuditLogId", |
||||
|
table: "AbpEntityChanges", |
||||
|
column: "AuditLogId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", |
||||
|
table: "AbpEntityChanges", |
||||
|
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityPropertyChanges_EntityChangeId", |
||||
|
table: "AbpEntityPropertyChanges", |
||||
|
column: "EntityChangeId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpFeatureValues", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", |
||||
|
table: "AbpLinkUsers", |
||||
|
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", |
||||
|
table: "AbpOrganizationUnitRoles", |
||||
|
columns: new[] { "RoleId", "OrganizationUnitId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpOrganizationUnits_Code", |
||||
|
table: "AbpOrganizationUnits", |
||||
|
column: "Code"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpOrganizationUnits_ParentId", |
||||
|
table: "AbpOrganizationUnits", |
||||
|
column: "ParentId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpPermissionGrants", |
||||
|
columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpRoleClaims_RoleId", |
||||
|
table: "AbpRoleClaims", |
||||
|
column: "RoleId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpRoles_NormalizedName", |
||||
|
table: "AbpRoles", |
||||
|
column: "NormalizedName"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_Action", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "Action" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_ApplicationName", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "ApplicationName" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_Identity", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "Identity" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_UserId", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpSettings", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpTenants_Name", |
||||
|
table: "AbpTenants", |
||||
|
column: "Name"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUserClaims_UserId", |
||||
|
table: "AbpUserClaims", |
||||
|
column: "UserId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUserLogins_LoginProvider_ProviderKey", |
||||
|
table: "AbpUserLogins", |
||||
|
columns: new[] { "LoginProvider", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", |
||||
|
table: "AbpUserOrganizationUnits", |
||||
|
columns: new[] { "UserId", "OrganizationUnitId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUserRoles_RoleId_UserId", |
||||
|
table: "AbpUserRoles", |
||||
|
columns: new[] { "RoleId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUsers_Email", |
||||
|
table: "AbpUsers", |
||||
|
column: "Email"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUsers_NormalizedEmail", |
||||
|
table: "AbpUsers", |
||||
|
column: "NormalizedEmail"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUsers_NormalizedUserName", |
||||
|
table: "AbpUsers", |
||||
|
column: "NormalizedUserName"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpUsers_UserName", |
||||
|
table: "AbpUsers", |
||||
|
column: "UserName"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpAuditLogActions"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpBackgroundJobs"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpClaimTypes"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpEntityPropertyChanges"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpFeatureValues"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpLinkUsers"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpOrganizationUnitRoles"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpPermissionGrants"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpRoleClaims"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpSecurityLogs"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpSettings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpTenantConnectionStrings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserClaims"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserLogins"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserOrganizationUnits"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserRoles"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserTokens"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpEntityChanges"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpTenants"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpOrganizationUnits"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpRoles"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUsers"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpAuditLogs"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,32 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Builder; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.Hosting; |
||||
|
using Serilog; |
||||
|
using Serilog.Events; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
public class Program |
||||
|
{ |
||||
|
public static void Main(string[] args) |
||||
|
{ |
||||
|
CreateHostBuilder(args).Build().Run(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private static IHostBuilder CreateHostBuilder(string[] args) => |
||||
|
Host.CreateDefaultBuilder(args) |
||||
|
.ConfigureWebHostDefaults(webBuilder => |
||||
|
{ |
||||
|
webBuilder.ConfigureKestrel((context, options) => { options.Limits.MaxRequestBodySize = 1024 * 50; }); |
||||
|
webBuilder.UseStartup<Startup>(); |
||||
|
}) |
||||
|
.UseSerilog((context, loggerConfiguration) => |
||||
|
{ |
||||
|
SerilogToEsExtensions.SetSerilogConfiguration( |
||||
|
loggerConfiguration, |
||||
|
context.Configuration); |
||||
|
}).UseAutofac(); |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
{ |
||||
|
"profiles": { |
||||
|
"Lion.AbpPro.BasicManagement.HttpApi.Host": { |
||||
|
"commandName": "Project", |
||||
|
"launchBrowser": true, |
||||
|
"applicationUrl": "http://localhost:44324", |
||||
|
"environmentVariables": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using Serilog; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement |
||||
|
{ |
||||
|
public static class SerilogToEsExtensions |
||||
|
{ |
||||
|
public static void SetSerilogConfiguration(LoggerConfiguration loggerConfiguration, IConfiguration configuration) |
||||
|
{ |
||||
|
// 默认读取 configuration 中 "Serilog" 节点下的配置
|
||||
|
loggerConfiguration |
||||
|
.ReadFrom.Configuration(configuration) |
||||
|
.Enrich.FromLogContext(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement |
||||
|
{ |
||||
|
public class Startup |
||||
|
{ |
||||
|
public void ConfigureServices(IServiceCollection services) |
||||
|
{ |
||||
|
services.AddApplication<BasicManagementHttpApiHostModule>(); |
||||
|
} |
||||
|
|
||||
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) |
||||
|
{ |
||||
|
app.InitializeApplication(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
{ |
||||
|
"Serilog": { |
||||
|
"Using": [ |
||||
|
"Serilog.Sinks.Console", |
||||
|
"Serilog.Sinks.File" |
||||
|
], |
||||
|
"MinimumLevel": { |
||||
|
"Default": "Debug", |
||||
|
"Override": { |
||||
|
"Microsoft": "Information", |
||||
|
"Volo.Abp": "Information", |
||||
|
"Hangfire": "Information", |
||||
|
"DotNetCore.CAP": "Information", |
||||
|
"Serilog.AspNetCore": "Information", |
||||
|
"Microsoft.EntityFrameworkCore": "Warning", |
||||
|
"Microsoft.AspNetCore": "Information" |
||||
|
} |
||||
|
}, |
||||
|
"WriteTo": [ |
||||
|
{ |
||||
|
"Name": "Console" |
||||
|
}, |
||||
|
{ |
||||
|
"Name": "File", |
||||
|
"Args": { |
||||
|
"path": "logs/logs-.txt", |
||||
|
"rollingInterval": "Day" |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
"App": { |
||||
|
"SelfUrl": "http://localhost:44315", |
||||
|
"CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100" |
||||
|
}, |
||||
|
"ConnectionStrings": { |
||||
|
"Default": "Data Source=localhost;Port=3306;Database=LionAbpProBasicManagementDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" |
||||
|
}, |
||||
|
"Redis": { |
||||
|
"Configuration": "localhost,password=mypassword,defaultdatabase=1" |
||||
|
}, |
||||
|
"Jwt": { |
||||
|
"Audience": "Lion.AbpPro.BasicManagement", |
||||
|
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=", |
||||
|
"Issuer": "Lion.AbpPro", |
||||
|
"ExpirationTime": 30 |
||||
|
} |
||||
|
} |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.AuditLogs |
namespace Lion.AbpPro.BasicManagement.AuditLogs |
||||
{ |
{ |
||||
public class GetAuditLogPageListOutput |
public class GetAuditLogPageListOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.AuditLogs |
namespace Lion.AbpPro.BasicManagement.AuditLogs |
||||
{ |
{ |
||||
public interface IAuditLogAppService : IApplicationService |
public interface IAuditLogAppService : IApplicationService |
||||
{ |
{ |
||||
@ -0,0 +1,67 @@ |
|||||
|
using System.Net; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.AuditLogs |
||||
|
{ |
||||
|
public class PagingAuditLogListInput : PagingBase |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 排序
|
||||
|
/// </summary>
|
||||
|
public string Sorting { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 开始时间
|
||||
|
/// </summary>
|
||||
|
public DateTime? StartTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 结束时间
|
||||
|
/// </summary>
|
||||
|
public DateTime? EndTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求方法
|
||||
|
/// </summary>
|
||||
|
public string HttpMethod { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求地址
|
||||
|
/// </summary>
|
||||
|
public string Url { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户名
|
||||
|
/// </summary>
|
||||
|
public string UserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 应用程序名称
|
||||
|
/// </summary>
|
||||
|
public string ApplicationName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// RequestId
|
||||
|
/// </summary>
|
||||
|
public string CorrelationId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 最大执行时间
|
||||
|
/// </summary>
|
||||
|
public int? MaxExecutionDuration { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 最小执行时间
|
||||
|
/// </summary>
|
||||
|
public int? MinExecutionDuration { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否有异常
|
||||
|
/// </summary>
|
||||
|
public bool? HasException { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// http 状态码
|
||||
|
/// </summary>
|
||||
|
public HttpStatusCode? HttpStatusCode { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
using Volo.Abp.Account; |
||||
|
using Volo.Abp.Application; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.Authorization; |
||||
|
using Volo.Abp.FeatureManagement; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(BasicManagementDomainSharedModule), |
||||
|
typeof(AbpDddApplicationContractsModule), |
||||
|
typeof(AbpAuthorizationModule), |
||||
|
typeof(AbpAccountApplicationContractsModule), |
||||
|
typeof(AbpFeatureManagementApplicationContractsModule), |
||||
|
typeof(AbpIdentityApplicationContractsModule), |
||||
|
typeof(AbpPermissionManagementApplicationContractsModule), |
||||
|
typeof(AbpSettingManagementApplicationContractsModule), |
||||
|
typeof(AbpTenantManagementApplicationContractsModule) |
||||
|
)] |
||||
|
public class BasicManagementApplicationContractsModule : AbpModule |
||||
|
{ |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
public class BasicManagementRemoteServiceConsts |
||||
|
{ |
||||
|
public const string RemoteServiceName = "BasicManagement"; |
||||
|
|
||||
|
public const string ModuleName = "basicManagement"; |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement.ConfigurationOptions |
||||
|
{ |
||||
|
public class JwtOptions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 过期时间 单位小时
|
||||
|
/// </summary>
|
||||
|
public int ExpirationTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Audience
|
||||
|
/// </summary>
|
||||
|
public string Audience { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 密钥
|
||||
|
/// </summary>
|
||||
|
public string SecurityKey { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Issuer
|
||||
|
/// </summary>
|
||||
|
public string Issuer { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,11 @@ |
|||||
|
// Global using directives
|
||||
|
|
||||
|
global using System.ComponentModel.DataAnnotations; |
||||
|
global using Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
global using Lion.AbpPro.BasicManagement.Tenants.Dtos; |
||||
|
global using Lion.AbpPro.Extension.Customs.Dtos; |
||||
|
global using Volo.Abp.Application.Dtos; |
||||
|
global using Volo.Abp.Application.Services; |
||||
|
global using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
||||
|
global using Volo.Abp.PermissionManagement; |
||||
|
global using Volo.Abp.TenantManagement; |
||||
@ -0,0 +1,22 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net6.0</TargetFramework> |
||||
|
<RootNamespace>Lion.AbpPro.BasicManagement</RootNamespace> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.Authorization" /> |
||||
|
<PackageReference Include="Volo.Abp.Account.Application.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" /> |
||||
|
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" /> |
||||
|
<PackageReference Include="Magicodes.IE.Excel.AspNetCore" /> |
||||
|
<ProjectReference Include="..\..\..\..\frameworks\Extensions\src\Lion.AbpPro.Extension\Lion.AbpPro.Extension.csproj" /> |
||||
|
<ProjectReference Include="..\Lion.AbpPro.BasicManagement.Domain.Shared\Lion.AbpPro.BasicManagement.Domain.Shared.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class AddRoleToOrganizationUnitInput |
public class AddRoleToOrganizationUnitInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class AddUserToOrganizationUnitInput |
public class AddUserToOrganizationUnitInput |
||||
{ |
{ |
||||
@ -0,0 +1,9 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
|
public class CreateOrganizationUnitInput |
||||
|
{ |
||||
|
[Required] |
||||
|
public string DisplayName { get; set; } |
||||
|
|
||||
|
public Guid? ParentId { get; set; } |
||||
|
} |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetOrganizationUnitRoleInput : PagingBase |
public class GetOrganizationUnitRoleInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetOrganizationUnitRoleOutput |
public class GetOrganizationUnitRoleOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetOrganizationUnitUserInput : PagingBase |
public class GetOrganizationUnitUserInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetOrganizationUnitUserOutput |
public class GetOrganizationUnitUserOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetUnAddRoleInput : PagingBase |
public class GetUnAddRoleInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetUnAddRoleOutput |
public class GetUnAddRoleOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetUnAddUserInput : PagingBase |
public class GetUnAddUserInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class GetUnAddUserOutput |
public class GetUnAddUserOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class OrganizationUnitDto |
public class OrganizationUnitDto |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class RemoveRoleToOrganizationUnitInput |
public class RemoveRoleToOrganizationUnitInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class RemoveUserToOrganizationUnitInput |
public class RemoveUserToOrganizationUnitInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits.Dto; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
public class TreeOutput |
public class TreeOutput |
||||
{ |
{ |
||||
@ -0,0 +1,9 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
|
||||
|
public class UpdateOrganizationUnitInput |
||||
|
{ |
||||
|
[Required] |
||||
|
public string DisplayName { get; set; } |
||||
|
|
||||
|
public Guid Id { get; set; } |
||||
|
} |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.OrganizationUnits; |
namespace Lion.AbpPro.BasicManagement.OrganizationUnits; |
||||
|
|
||||
public interface IOrganizationUnitAppService : IApplicationService |
public interface IOrganizationUnitAppService : IApplicationService |
||||
{ |
{ |
||||
@ -0,0 +1,43 @@ |
|||||
|
using Lion.AbpPro.BasicManagement.Localization; |
||||
|
using Volo.Abp.Authorization.Permissions; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.Localization; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Permissions; |
||||
|
|
||||
|
public class BasicManagementPermissionDefinitionProvider : PermissionDefinitionProvider |
||||
|
{ |
||||
|
public override void Define(IPermissionDefinitionContext context) |
||||
|
{ |
||||
|
var abpIdentityGroup = context.GetGroup(IdentityPermissions.GroupName); |
||||
|
var userManagement = abpIdentityGroup.GetPermissionOrNull(IdentityPermissions.Users.Default); |
||||
|
userManagement.AddChild(BasicManagementPermissions.SystemManagement.UserEnable, L("Permission:Enable")); |
||||
|
userManagement.AddChild(BasicManagementPermissions.SystemManagement.UserExport, L("Permission:Export")); |
||||
|
|
||||
|
var auditManagement = |
||||
|
abpIdentityGroup.AddPermission(BasicManagementPermissions.SystemManagement.AuditLog, L("Permission:AuditLogManagement")); |
||||
|
var settingManagement = abpIdentityGroup.AddPermission(BasicManagementPermissions.SystemManagement.Setting, L("Permission:SettingManagement")); |
||||
|
var organizationUnitManagement = abpIdentityGroup.AddPermission(BasicManagementPermissions.SystemManagement.OrganizationUnit, L("Permission:OrganizationUnitManagement")); |
||||
|
organizationUnitManagement.AddChild |
||||
|
( |
||||
|
BasicManagementPermissions.SystemManagement.OrganizationUnitManagement.Create, |
||||
|
L("Permission:Create") |
||||
|
); |
||||
|
organizationUnitManagement.AddChild |
||||
|
( |
||||
|
BasicManagementPermissions.SystemManagement.OrganizationUnitManagement.Update, |
||||
|
L("Permission:Update") |
||||
|
); |
||||
|
organizationUnitManagement.AddChild |
||||
|
( |
||||
|
BasicManagementPermissions.SystemManagement.OrganizationUnitManagement.Delete, |
||||
|
L("Permission:Delete") |
||||
|
); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private static LocalizableString L(string name) |
||||
|
{ |
||||
|
return LocalizableString.Create<BasicManagementResource>(name); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
using Volo.Abp.Reflection; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Permissions; |
||||
|
|
||||
|
public class BasicManagementPermissions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 系统管理扩展权限
|
||||
|
/// </summary>
|
||||
|
public static class SystemManagement |
||||
|
{ |
||||
|
public const string Default = "AbpIdentity"; |
||||
|
public const string UserEnable = Default + ".Users.Enable"; |
||||
|
public const string UserExport = Default + ".Users.Export"; |
||||
|
public const string AuditLog = Default + ".AuditLog"; |
||||
|
public const string Setting = Default + ".Setting"; |
||||
|
public const string OrganizationUnit = Default + ".OrganizationUnitManagement"; |
||||
|
public static class OrganizationUnitManagement |
||||
|
{ |
||||
|
public const string Default = SystemManagement.Default + ".OrganizationUnitManagement"; |
||||
|
public const string Create = Default + ".Create"; |
||||
|
public const string Update = Default + ".Update"; |
||||
|
public const string Delete = Default + ".Delete"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static string[] GetAll() |
||||
|
{ |
||||
|
return ReflectionHelper.GetPublicConstantsRecursively(typeof(BasicManagementPermissions)); |
||||
|
} |
||||
|
} |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Roles.Dtos |
namespace Lion.AbpPro.BasicManagement.Roles.Dtos |
||||
{ |
{ |
||||
public class GetPermissionInput |
public class GetPermissionInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Roles.Dtos |
namespace Lion.AbpPro.BasicManagement.Roles.Dtos |
||||
{ |
{ |
||||
public class PagingRoleListInput : PagingBase |
public class PagingRoleListInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Roles.Dtos |
namespace Lion.AbpPro.BasicManagement.Roles.Dtos |
||||
{ |
{ |
||||
public class PermissionOutput { |
public class PermissionOutput { |
||||
public List<string> Grants { get; set; } = new List<string>(); |
public List<string> Grants { get; set; } = new List<string>(); |
||||
@ -1,4 +1,6 @@ |
|||||
namespace Lion.AbpPro.Roles.Dtos |
using Volo.Abp.Identity; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Roles.Dtos |
||||
{ |
{ |
||||
public class UpdateRoleInput |
public class UpdateRoleInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Roles.Dtos |
namespace Lion.AbpPro.BasicManagement.Roles.Dtos |
||||
{ |
{ |
||||
public class UpdateRolePermissionsInput |
public class UpdateRolePermissionsInput |
||||
{ |
{ |
||||
@ -1,4 +1,6 @@ |
|||||
namespace Lion.AbpPro.Roles |
using Lion.AbpPro.BasicManagement.Roles.Dtos; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Roles |
||||
{ |
{ |
||||
public interface IRolePermissionAppService : IApplicationService |
public interface IRolePermissionAppService : IApplicationService |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Roles; |
namespace Lion.AbpPro.BasicManagement.Roles; |
||||
|
|
||||
public class PermissionOptions |
public class PermissionOptions |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Settings.Dtos |
namespace Lion.AbpPro.BasicManagement.Settings.Dtos |
||||
{ |
{ |
||||
public class SettingOutput |
public class SettingOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Settings.Dtos |
namespace Lion.AbpPro.BasicManagement.Settings.Dtos |
||||
{ |
{ |
||||
public class UpdateSettingInput |
public class UpdateSettingInput |
||||
{ |
{ |
||||
@ -1,4 +1,6 @@ |
|||||
namespace Lion.AbpPro.Settings |
using Lion.AbpPro.BasicManagement.Settings.Dtos; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Settings |
||||
{ |
{ |
||||
public interface ISettingAppService : IApplicationService |
public interface ISettingAppService : IApplicationService |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Tenants.Dtos |
namespace Lion.AbpPro.BasicManagement.Tenants.Dtos |
||||
{ |
{ |
||||
public class FindTenantByNameInput |
public class FindTenantByNameInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Tenants.Dtos |
namespace Lion.AbpPro.BasicManagement.Tenants.Dtos |
||||
{ |
{ |
||||
public class PagingTenantInput : PagingBase |
public class PagingTenantInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Tenants.Dtos |
namespace Lion.AbpPro.BasicManagement.Tenants.Dtos |
||||
{ |
{ |
||||
public class UpdateConnectionStringInput |
public class UpdateConnectionStringInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Tenants.Dtos |
namespace Lion.AbpPro.BasicManagement.Tenants.Dtos |
||||
{ |
{ |
||||
public class UpdateTenantInput |
public class UpdateTenantInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Tenants |
namespace Lion.AbpPro.BasicManagement.Tenants |
||||
{ |
{ |
||||
public interface IVoloTenantAppService : IApplicationService |
public interface IVoloTenantAppService : IApplicationService |
||||
{ |
{ |
||||
@ -0,0 +1,32 @@ |
|||||
|
using Magicodes.ExporterAndImporter.Core; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
|
{ |
||||
|
public class ExportIdentityUserOutput |
||||
|
{ |
||||
|
[ExporterHeader(DisplayName = "用户名")] |
||||
|
public string UserName { get; set; } |
||||
|
|
||||
|
[ExporterHeader(DisplayName = "真实名称")] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[ExporterHeader(DisplayName = "邮箱")] |
||||
|
public string Email { get; set; } |
||||
|
|
||||
|
[ExporterHeader(DisplayName = "手机号码")] |
||||
|
public string PhoneNumber { get; set; } |
||||
|
|
||||
|
[ExporterHeader(IsIgnore = true)] |
||||
|
public bool IsActive { get; set; } |
||||
|
|
||||
|
|
||||
|
[ExporterHeader(DisplayName = "状态")] |
||||
|
public string Status => IsActive ? "启用" : "禁用"; |
||||
|
|
||||
|
[ExporterHeader(IsIgnore = true)] |
||||
|
public DateTime CreationTime { get; set; } |
||||
|
|
||||
|
[ExporterHeader(DisplayName = "创建时间")] |
||||
|
public string CreationTimeFormat => CreationTime.ToString("yyyy-MM-dd hh:mm:ss"); |
||||
|
} |
||||
|
} |
||||
@ -1,4 +1,6 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos; |
using Newtonsoft.Json; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Users.Dtos; |
||||
|
|
||||
public class GithubAccessTokenResponse |
public class GithubAccessTokenResponse |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos |
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
{ |
{ |
||||
public class LockUserInput |
public class LockUserInput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos; |
namespace Lion.AbpPro.BasicManagement.Users.Dtos; |
||||
|
|
||||
public class LoginGithubResponse |
public class LoginGithubResponse |
||||
{ |
{ |
||||
@ -1,4 +1,6 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos |
using Volo.Abp.Auditing; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
{ |
{ |
||||
/// <summary>
|
/// <summary>
|
||||
/// 登录
|
/// 登录
|
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos |
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
{ |
{ |
||||
public class LoginOutput |
public class LoginOutput |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos |
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
{ |
{ |
||||
public class LoginStsResponse |
public class LoginStsResponse |
||||
{ |
{ |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos |
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
{ |
{ |
||||
public class PagingUserListInput : PagingBase |
public class PagingUserListInput : PagingBase |
||||
{ |
{ |
||||
@ -1,4 +1,6 @@ |
|||||
namespace Lion.AbpPro.Users.Dtos |
using Volo.Abp.Identity; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Users.Dtos |
||||
{ |
{ |
||||
public class UpdateUserInput |
public class UpdateUserInput |
||||
{ |
{ |
||||
@ -1,12 +1,12 @@ |
|||||
namespace Lion.AbpPro.Users |
using Lion.AbpPro.BasicManagement.Users.Dtos; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Users |
||||
{ |
{ |
||||
public interface IAccountAppService: IApplicationService |
public interface IAccountAppService: IApplicationService |
||||
{ |
{ |
||||
/// <summary>
|
/// <summary>
|
||||
/// 用户名密码登录
|
/// 用户名密码登录
|
||||
/// </summary>
|
/// </summary>
|
||||
/// <param name="input"></param>
|
|
||||
/// <returns></returns>
|
|
||||
Task<LoginOutput> LoginAsync(LoginInput input); |
Task<LoginOutput> LoginAsync(LoginInput input); |
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
using Lion.AbpPro.BasicManagement.Localization; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
public abstract class BasicManagementAppService : ApplicationService |
||||
|
{ |
||||
|
protected BasicManagementAppService() |
||||
|
{ |
||||
|
LocalizationResource = typeof(BasicManagementResource); |
||||
|
ObjectMapperContext = typeof(BasicManagementApplicationModule); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
using AutoMapper; |
||||
|
using Lion.AbpPro.BasicManagement.AuditLogs; |
||||
|
using Lion.AbpPro.BasicManagement.Users.Dtos; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
public class BasicManagementApplicationAutoMapperProfile : Profile |
||||
|
{ |
||||
|
public BasicManagementApplicationAutoMapperProfile() |
||||
|
{ |
||||
|
CreateMap<AuditLog, GetAuditLogPageListOutput>(); |
||||
|
CreateMap<Volo.Abp.Identity.IdentityUser, LoginOutput>() |
||||
|
.ForMember(dest => dest.Token, opt => opt.Ignore()); |
||||
|
CreateMap<IdentityUser, ExportIdentityUserOutput>() |
||||
|
.ForMember(e => e.CreationTimeFormat, opt => opt.Ignore()) |
||||
|
.ForMember(e => e.Status, opt => opt.Ignore()); |
||||
|
CreateMap<OrganizationUnit, OrganizationUnitDto>(); |
||||
|
CreateMap<IdentityUser, GetOrganizationUnitUserOutput>(); |
||||
|
CreateMap<IdentityUser, GetUnAddUserOutput>(); |
||||
|
CreateMap<IdentityRole, GetOrganizationUnitRoleOutput>(); |
||||
|
CreateMap<IdentityRole, GetUnAddRoleOutput>(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,67 @@ |
|||||
|
using Lion.AbpPro.BasicManagement.ConfigurationOptions; |
||||
|
using Lion.AbpPro.BasicManagement.Roles; |
||||
|
using Magicodes.ExporterAndImporter.Core; |
||||
|
using Magicodes.ExporterAndImporter.Excel; |
||||
|
using Volo.Abp.Account; |
||||
|
using Volo.Abp.AutoMapper; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.Application; |
||||
|
using Volo.Abp.FeatureManagement; |
||||
|
using Volo.Abp.Identity.AspNetCore; |
||||
|
using Volo.Abp.PermissionManagement; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(BasicManagementDomainModule), |
||||
|
typeof(BasicManagementApplicationContractsModule), |
||||
|
typeof(AbpDddApplicationModule), |
||||
|
typeof(AbpIdentityAspNetCoreModule), |
||||
|
typeof(AbpAutoMapperModule), |
||||
|
typeof(AbpAccountApplicationModule), |
||||
|
typeof(AbpIdentityApplicationModule), |
||||
|
typeof(AbpPermissionManagementApplicationModule), |
||||
|
typeof(AbpTenantManagementApplicationModule), |
||||
|
typeof(AbpFeatureManagementApplicationModule), |
||||
|
typeof(AbpSettingManagementApplicationModule), |
||||
|
typeof(AbpAuditLoggingDomainModule) |
||||
|
)] |
||||
|
public class BasicManagementApplicationModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
context.Services.AddAutoMapperObjectMapper<BasicManagementApplicationModule>(); |
||||
|
Configure<AbpAutoMapperOptions>(options => |
||||
|
{ |
||||
|
options.AddMaps<BasicManagementApplicationModule>(validate: true); |
||||
|
}); |
||||
|
|
||||
|
Configure<PermissionOptions>(options => |
||||
|
{ |
||||
|
options.Excludes.Add("AbpIdentity.Users.ManagePermissions"); |
||||
|
options.Excludes.Add("AbpIdentity.UserLookup"); |
||||
|
options.Excludes.Add("FeatureManagement"); |
||||
|
options.Excludes.Add("FeatureManagement.ManageHostFeatures"); |
||||
|
options.Excludes.Add("SettingManagement"); |
||||
|
options.Excludes.Add("SettingManagement.Emailing"); |
||||
|
options.Excludes.Add("AbpTenantManagement"); |
||||
|
options.Excludes.Add("AbpTenantManagement.Tenants.ManageFeatures"); |
||||
|
options.Excludes.Add("AbpTenantManagement.Tenants.ManageConnectionStrings"); |
||||
|
}); |
||||
|
|
||||
|
context.Services.Configure<JwtOptions>(context.Services.GetConfiguration().GetSection("Jwt")); |
||||
|
|
||||
|
ConfigureMagicodes(context); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 配置Magicodes.IE
|
||||
|
/// Excel导入导出
|
||||
|
/// </summary>
|
||||
|
private void ConfigureMagicodes(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
context.Services.AddTransient<IExporter, ExcelExporter>(); |
||||
|
context.Services.AddTransient<IExcelExporter, ExcelExporter>(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,31 @@ |
|||||
|
// Global using directives
|
||||
|
|
||||
|
global using System.Globalization; |
||||
|
global using AutoMapper.Internal.Mappers; |
||||
|
global using Lion.AbpPro.BasicManagement.OrganizationUnits.Dto; |
||||
|
global using Lion.AbpPro.BasicManagement.Permissions; |
||||
|
global using Lion.AbpPro.BasicManagement.Tenants.Dtos; |
||||
|
global using Lion.AbpPro.Extension.Customs.Dtos; |
||||
|
global using Microsoft.AspNetCore.Authorization; |
||||
|
global using Microsoft.Extensions.DependencyInjection; |
||||
|
global using Microsoft.Extensions.Localization; |
||||
|
global using Microsoft.Extensions.Logging; |
||||
|
global using Microsoft.Extensions.Options; |
||||
|
global using Volo.Abp; |
||||
|
global using Volo.Abp.Application.Dtos; |
||||
|
global using Volo.Abp.Application.Services; |
||||
|
global using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; |
||||
|
global using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending; |
||||
|
global using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
||||
|
global using Volo.Abp.AuditLogging; |
||||
|
global using Volo.Abp.Authorization; |
||||
|
global using Volo.Abp.Authorization.Permissions; |
||||
|
global using Volo.Abp.DependencyInjection; |
||||
|
global using Volo.Abp.Features; |
||||
|
global using Volo.Abp.Identity; |
||||
|
global using Volo.Abp.Localization; |
||||
|
global using Volo.Abp.MultiTenancy; |
||||
|
global using Volo.Abp.Settings; |
||||
|
global using Volo.Abp.TenantManagement; |
||||
|
global using Volo.Abp.Timing; |
||||
|
global using Volo.Abp.Users; |
||||
@ -0,0 +1,26 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net6.0</TargetFramework> |
||||
|
<RootNamespace>Lion.AbpPro.BasicManagement</RootNamespace> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.AutoMapper" /> |
||||
|
<PackageReference Include="Volo.Abp.Ddd.Application" /> |
||||
|
<PackageReference Include="Volo.Abp.Account.Application" /> |
||||
|
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" /> |
||||
|
<PackageReference Include="Volo.Abp.Identity.Application" /> |
||||
|
<PackageReference Include="Volo.Abp.Identity.AspNetCore" /> |
||||
|
<PackageReference Include="Volo.Abp.PermissionManagement.Application" /> |
||||
|
<PackageReference Include="Volo.Abp.TenantManagement.Application" /> |
||||
|
<PackageReference Include="Volo.Abp.FeatureManagement.Application" /> |
||||
|
<PackageReference Include="Volo.Abp.SettingManagement.Application" /> |
||||
|
<PackageReference Include="Microsoft.IdentityModel.Tokens" /> |
||||
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" /> |
||||
|
<PackageReference Include="IdentityModel" /> |
||||
|
<ProjectReference Include="..\Lion.AbpPro.BasicManagement.Application.Contracts\Lion.AbpPro.BasicManagement.Application.Contracts.csproj" /> |
||||
|
<ProjectReference Include="..\Lion.AbpPro.BasicManagement.Domain\Lion.AbpPro.BasicManagement.Domain.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -1,7 +1,10 @@ |
|||||
namespace Lion.AbpPro.Roles |
using Lion.AbpPro.BasicManagement.Roles.Dtos; |
||||
|
using Volo.Abp.PermissionManagement; |
||||
|
|
||||
|
namespace Lion.AbpPro.BasicManagement.Roles |
||||
{ |
{ |
||||
[Authorize] |
[Authorize] |
||||
public class RolePermissionAppService : AbpProAppService, IRolePermissionAppService |
public class RolePermissionAppService : BasicManagementAppService, IRolePermissionAppService |
||||
{ |
{ |
||||
private readonly IPermissionAppService _rolePermissionAppService; |
private readonly IPermissionAppService _rolePermissionAppService; |
||||
private readonly PermissionOptions _permissionOptions; |
private readonly PermissionOptions _permissionOptions; |
||||
@ -1,7 +1,7 @@ |
|||||
namespace Lion.AbpPro.Tenants |
namespace Lion.AbpPro.BasicManagement.Tenants |
||||
{ |
{ |
||||
[Authorize] |
[Authorize] |
||||
public class VoloTenantAppService : AbpProAppService, IVoloTenantAppService |
public class VoloTenantAppService : BasicManagementAppService, IVoloTenantAppService |
||||
{ |
{ |
||||
private readonly IAbpTenantAppService _abpTenantAppService; |
private readonly IAbpTenantAppService _abpTenantAppService; |
||||
private readonly ITenantAppService _tenantAppService; |
private readonly ITenantAppService _tenantAppService; |
||||
@ -0,0 +1,9 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
public static class BasicManagementConsts |
||||
|
{ |
||||
|
/// <summary>名称空间</summary>
|
||||
|
public const string NameSpace = "Lion.AbpPro.BasicManagement"; |
||||
|
/// <summary>默认语言</summary>
|
||||
|
public const string DefaultCultureName = "zh-Hans"; |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpAuditLoggingDomainSharedModule), |
||||
|
typeof(AbpBackgroundJobsDomainSharedModule), |
||||
|
typeof(AbpFeatureManagementDomainSharedModule), |
||||
|
typeof(AbpIdentityDomainSharedModule), |
||||
|
typeof(AbpPermissionManagementDomainSharedModule), |
||||
|
typeof(AbpSettingManagementDomainSharedModule), |
||||
|
typeof(AbpTenantManagementDomainSharedModule) |
||||
|
)] |
||||
|
public class BasicManagementDomainSharedModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
Configure<AbpVirtualFileSystemOptions>(options => |
||||
|
{ |
||||
|
options.FileSets.AddEmbedded<BasicManagementDomainSharedModule>(BasicManagementConsts.NameSpace); |
||||
|
}); |
||||
|
|
||||
|
Configure<AbpLocalizationOptions>(options => |
||||
|
{ |
||||
|
options.Resources |
||||
|
.Add<BasicManagementResource>(BasicManagementConsts.DefaultCultureName) |
||||
|
.AddVirtualJson("/Localization/BasicManagement") |
||||
|
.AddBaseTypes(typeof(IdentityResource)) |
||||
|
.AddBaseTypes(typeof(AbpValidationResource)) |
||||
|
.AddBaseTypes(typeof(AbpLocalizationResource)) |
||||
|
.AddBaseTypes(typeof(AbpSettingManagementResource)); |
||||
|
|
||||
|
options.DefaultResourceType = typeof(BasicManagementResource); |
||||
|
}); |
||||
|
|
||||
|
Configure<AbpExceptionLocalizationOptions>(options => |
||||
|
{ |
||||
|
options.MapCodeNamespace(BasicManagementConsts.NameSpace, typeof(BasicManagementResource)); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
namespace Lion.AbpPro.BasicManagement; |
||||
|
|
||||
|
public static class BasicManagementErrorCodes |
||||
|
{ |
||||
|
public const string OrganizationUnitNotExist =BasicManagementConsts.NameSpace+ ":100001"; |
||||
|
public const string UserLockedOut =BasicManagementConsts.NameSpace+ ":100002"; |
||||
|
public const string UserOrPasswordMismatch =BasicManagementConsts.NameSpace+ ":100003"; |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
||||
|
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
||||
|
<xs:element name="Weavers"> |
||||
|
<xs:complexType> |
||||
|
<xs:all> |
||||
|
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
||||
|
<xs:complexType> |
||||
|
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:all> |
||||
|
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
||||
|
<xs:annotation> |
||||
|
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
||||
|
</xs:annotation> |
||||
|
</xs:attribute> |
||||
|
</xs:complexType> |
||||
|
</xs:element> |
||||
|
</xs:schema> |
||||
@ -0,0 +1,19 @@ |
|||||
|
// Global using directives
|
||||
|
|
||||
|
global using Lion.AbpPro.BasicManagement.Localization; |
||||
|
global using Volo.Abp.AuditLogging; |
||||
|
global using Volo.Abp.BackgroundJobs; |
||||
|
global using Volo.Abp.FeatureManagement; |
||||
|
global using Volo.Abp.Identity; |
||||
|
global using Volo.Abp.Identity.Localization; |
||||
|
global using Volo.Abp.Localization; |
||||
|
global using Volo.Abp.Localization.ExceptionHandling; |
||||
|
global using Volo.Abp.Localization.Resources.AbpLocalization; |
||||
|
global using Volo.Abp.Modularity; |
||||
|
global using Volo.Abp.PermissionManagement; |
||||
|
global using Volo.Abp.SettingManagement; |
||||
|
global using Volo.Abp.SettingManagement.Localization; |
||||
|
global using Volo.Abp.TenantManagement; |
||||
|
global using Volo.Abp.Validation; |
||||
|
global using Volo.Abp.Validation.Localization; |
||||
|
global using Volo.Abp.VirtualFileSystem; |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue