diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj
index 627584fb9..45c00f202 100644
--- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj
+++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj
@@ -22,7 +22,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json
index 5134cd6f5..c865dd625 100644
--- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json
+++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json
@@ -1,78 +1,34 @@
{
"ConnectionStrings": {
- "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
- "Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
- "Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
- "Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
+ "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
- "StringEncryption": {
- "DefaultPassPhrase": "s46c5q55nxpeS8Ra",
- "InitVectorBytes": "s83ng0abvd02js84",
- "DefaultSalt": "sf&5)s3#"
- },
- "Serilog": {
- "MinimumLevel": {
- "Default": "Information",
- "Override": {
- "System": "Warning",
- "Microsoft": "Warning",
- "DotNetCore": "Information"
- }
- },
- "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ],
- "WriteTo": [
- {
- "Name": "Console",
- "Args": {
- "restrictedToMinimumLevel": "Debug",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
- }
- },
- {
- "Name": "File",
- "Args": {
- "path": "Logs/Debug-.log",
- "restrictedToMinimumLevel": "Debug",
- "rollingInterval": "Day",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
- }
- },
- {
- "Name": "File",
- "Args": {
- "path": "Logs/Info-.log",
- "restrictedToMinimumLevel": "Information",
- "rollingInterval": "Day",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
- }
- },
- {
- "Name": "File",
- "Args": {
- "path": "Logs/Warn-.log",
- "restrictedToMinimumLevel": "Warning",
- "rollingInterval": "Day",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
- }
+ "OpenIddict": {
+ "Applications": {
+ "VueAdmin": {
+ "ClientId": "vue-admin-client",
+ "ClientSecret": "1q2w3e*",
+ "RootUrls": [ "http://localhost:5666" ]
},
- {
- "Name": "File",
- "Args": {
- "path": "Logs/Error-.log",
- "restrictedToMinimumLevel": "Error",
- "rollingInterval": "Day",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
- }
+ "InternalService": {
+ "ClientId": "InternalServiceClient",
+ "ClientSecret": "1q2w3e*"
},
- {
- "Name": "File",
- "Args": {
- "path": "Logs/Fatal-.log",
- "restrictedToMinimumLevel": "Fatal",
- "rollingInterval": "Day",
- "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
- }
+ "VueOAuthClient": {
+ "ClientId": "vue-oauth-client",
+ "RootUrls": [
+ "http://localhost:5666",
+ "http://localhost:30000",
+ "http://localhost:30010",
+ "http://localhost:30015",
+ "http://localhost:30020",
+ "http://localhost:30025",
+ "http://localhost:30030",
+ "http://localhost:30040",
+ "http://localhost:30045",
+ "http://localhost:30050",
+ "http://localhost:30060"
+ ]
}
- ]
+ }
}
}
diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs
index 79ef3a66e..e19004c0f 100644
--- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs
+++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs
@@ -1,8 +1,6 @@
using LINGYUN.Abp.Data.DbMigrator;
-using LINGYUN.Abp.Saas.Tenants;
using Microsoft.Extensions.Logging;
using System;
-using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
@@ -15,14 +13,10 @@ namespace LY.MicroService.AuthServer.EntityFrameworkCore;
public class AuthServerDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency
{
- protected IDataSeeder DataSeeder { get; }
- protected IDbSchemaMigrator DbSchemaMigrator { get; }
- protected ITenantRepository TenantRepository { get; }
+ protected AuthServerDataSeeder DataSeeder { get; }
public AuthServerDbMigrationService(
- IDataSeeder dataSeeder,
- IDbSchemaMigrator dbSchemaMigrator,
- ITenantRepository tenantRepository,
+ AuthServerDataSeeder dataSeeder,
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
IServiceProvider serviceProvider,
@@ -34,25 +28,11 @@ public class AuthServerDbMigrationService : EfCoreRuntimeDbMigratorBase x.IsActive))
- {
- await LockAndApplyDatabaseWithTenantMigrationsAsync(tenant.Id);
- }
}
protected async override Task SeedAsync()
{
- Logger.LogInformation($"Executing {(!CurrentTenant.IsAvailable ? "host" : CurrentTenant.Name ?? CurrentTenant.GetId().ToString())} database seed...");
-
- await DataSeeder.SeedAsync(CurrentTenant.Id);
+ // DbMigrator迁移数据种子
+ await DataSeeder.SeedAsync(new DataSeedContext());
}
}
\ No newline at end of file
diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs
index 88e530b07..1b17c95f1 100644
--- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs
+++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityClaimTypeDataSeeder.cs
@@ -1,5 +1,6 @@
using JetBrains.Annotations;
using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
using OpenIddict.Abstractions;
using System.Threading.Tasks;
using Volo.Abp.Data;
@@ -23,6 +24,8 @@ public class IdentityClaimTypeDataSeeder : ITransientDependency
GuidGenerator = guidGenerator;
IdentityClaimTypeManager = identityClaimTypeManager;
IdentityClaimTypeRepository = identityClaimTypeRepository;
+
+ Logger = NullLogger.Instance;
}
public async virtual Task SeedAsync(DataSeedContext context)
@@ -72,8 +75,12 @@ public class IdentityClaimTypeDataSeeder : ITransientDependency
[CanBeNull] string description = null,
IdentityClaimValueType valueType = IdentityClaimValueType.String)
{
+ Logger.LogInformation("Check claim types {name} exists.", name);
+
if (!await IdentityClaimTypeRepository.AnyAsync(name))
{
+ Logger.LogInformation("Create new claim types {name}.", name);
+
await IdentityClaimTypeManager.CreateAsync(
new IdentityClaimType(
GuidGenerator.Create(),
diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs
index 2c7630193..26d77aa0f 100644
--- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs
+++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/DataSeeds/IdentityUserRoleDataSeeder.cs
@@ -1,4 +1,6 @@
using Microsoft.AspNetCore.Identity;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using System;
using System.Threading.Tasks;
@@ -19,6 +21,8 @@ public class IdentityUserRoleDataSeeder : ITransientDependency
public const string AdminPasswordPropertyName = "AdminPassword";
public const string AdminPasswordDefaultValue = "1q2w3E*";
+ public ILogger Logger { protected get; set; }
+
protected IGuidGenerator GuidGenerator { get; }
protected IIdentityRoleRepository RoleRepository { get; }
protected IIdentityUserRepository UserRepository { get; }
@@ -43,12 +47,19 @@ public class IdentityUserRoleDataSeeder : ITransientDependency
UserManager = userManager;
RoleManager = roleManager;
IdentityOptions = identityOptions;
+
+ Logger = NullLogger.Instance;
}
public virtual async Task SeedAsync(DataSeedContext context)
{
+ Logger.LogInformation("Seeding the admin user roles...");
await SeedAdminUserAsync(context);
+
+ Logger.LogInformation("Seeding the default roles...");
await SeedDefaultRoleAsync(context);
+
+ Logger.LogInformation("Seeding user roles completed.");
}
private async Task SeedAdminUserAsync(DataSeedContext context)
@@ -59,8 +70,13 @@ public class IdentityUserRoleDataSeeder : ITransientDependency
var adminUserName = context?[AdminUserNamePropertyName] as string ?? AdminUserNameDefaultValue;
Guid adminRoleId;
+
+ Logger.LogInformation("Check admin role {adminRoleName} exists.", adminRoleName);
+
if (!await RoleManager.RoleExistsAsync(adminRoleName))
{
+ Logger.LogInformation("Create new role {adminRoleName}.", adminRoleName);
+
adminRoleId = GuidGenerator.Create();
var adminRole = new IdentityRole(
adminRoleId,
@@ -87,9 +103,13 @@ public class IdentityUserRoleDataSeeder : ITransientDependency
var adminEmailAddress = context?[AdminEmailPropertyName] as string ?? AdminEmailDefaultValue;
var adminPassword = context?[AdminPasswordPropertyName] as string ?? AdminPasswordDefaultValue;
+ Logger.LogInformation("Check admin user {adminUserName} exists.", adminUserName);
+
var adminUser = await UserManager.FindByNameAsync(adminUserName);
if (adminUser == null)
{
+ Logger.LogInformation("Create new user {adminUserName}.", adminUserName);
+
adminUser = new IdentityUser(
adminUserId,
adminUserName,
@@ -100,6 +120,8 @@ public class IdentityUserRoleDataSeeder : ITransientDependency
// 创建租户管理用户
(await UserManager.CreateAsync(adminUser)).CheckErrors();
+
+ Logger.LogInformation("Add user {adminUserName} password.", adminUserName);
(await UserManager.AddPasswordAsync(adminUser, adminPassword)).CheckErrors();
}
}
@@ -107,8 +129,10 @@ public class IdentityUserRoleDataSeeder : ITransientDependency
private async Task SeedDefaultRoleAsync(DataSeedContext context)
{
const string defaultRoleName = "Users";
- if (await RoleManager.FindByNameAsync(defaultRoleName) != null)
+ Logger.LogInformation("Check Role {defaultRoleName} exists.", defaultRoleName);
+ if (!await RoleManager.RoleExistsAsync(defaultRoleName))
{
+ Logger.LogInformation("Create new role {defaultRoleName}.", defaultRoleName);
var roleId = GuidGenerator.Create();
var defaultRole = new IdentityRole(
roleId,
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs
index 77b9b3773..33394b8e8 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs
@@ -1,12 +1,11 @@
using LINGYUN.Abp.Auditing;
+using LINGYUN.Abp.BlobManagement;
using LINGYUN.Abp.CachingManagement;
using LINGYUN.Abp.Identity;
-using LINGYUN.Abp.IdentityServer;
using LINGYUN.Abp.LocalizationManagement;
using LINGYUN.Abp.MessageService;
using LINGYUN.Abp.Notifications;
using LINGYUN.Abp.OpenIddict;
-using LINGYUN.Abp.OssManagement;
using LINGYUN.Abp.SettingManagement;
using LINGYUN.Abp.TaskManagement;
using LINGYUN.Abp.TextTemplating;
@@ -30,10 +29,9 @@ namespace LY.MicroService.BackendAdmin.DbMigrator;
typeof(AbpAuditingApplicationContractsModule),
typeof(AbpTextTemplatingApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
- typeof(AbpIdentityServerApplicationContractsModule),
typeof(AbpOpenIddictApplicationContractsModule),
typeof(PlatformApplicationContractModule),
- typeof(AbpOssManagementApplicationContractsModule),
+ typeof(AbpBlobManagementApplicationContractsModule),
typeof(AbpNotificationsApplicationContractsModule),
typeof(AbpMessageServiceApplicationContractsModule),
typeof(TaskManagementApplicationContractsModule),
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj
index a75ccdcc7..20e58b06c 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj
@@ -38,9 +38,8 @@
-
+
-
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json
index 848a0f83b..3a9b9034b 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
- "Default": "Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None"
+ "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDataSeeder.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/AdminServiceDataSeeder.cs
similarity index 89%
rename from aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDataSeeder.cs
rename to aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/AdminServiceDataSeeder.cs
index c0a681648..243674b95 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDataSeeder.cs
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/AdminServiceDataSeeder.cs
@@ -1,6 +1,5 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
-using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions;
@@ -11,14 +10,14 @@ using Volo.Abp.PermissionManagement;
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
-public class BackendAdminDataSeeder : ITransientDependency
+public class AdminServiceDataSeeder : ITransientDependency
{
- protected ILogger Logger { get; }
+ protected ILogger Logger { get; }
protected ICurrentTenant CurrentTenant { get; }
protected IPermissionDefinitionManager PermissionDefinitionManager { get; }
protected IPermissionDataSeeder PermissionDataSeeder { get; }
- public BackendAdminDataSeeder(
+ public AdminServiceDataSeeder(
IPermissionDefinitionManager permissionDefinitionManager,
IPermissionDataSeeder permissionDataSeeder,
ICurrentTenant currentTenant)
@@ -27,7 +26,7 @@ public class BackendAdminDataSeeder : ITransientDependency
PermissionDataSeeder = permissionDataSeeder;
CurrentTenant = currentTenant;
- Logger = NullLogger.Instance;
+ Logger = NullLogger.Instance;
}
public virtual async Task SeedAsync(DataSeedContext context)
@@ -59,3 +58,4 @@ public class BackendAdminDataSeeder : ITransientDependency
Logger.LogInformation("Seed default role permissions completed.");
}
}
+
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs
index 5d9254cba..5f8ef58db 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationEventHandler.cs
@@ -11,7 +11,7 @@ namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
public class BackendAdminDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase
{
- protected BackendAdminDataSeeder DataSeeder { get; }
+ protected AdminServiceDataSeeder DataSeeder { get; }
public BackendAdminDbMigrationEventHandler(
ICurrentTenant currentTenant,
@@ -20,7 +20,7 @@ public class BackendAdminDbMigrationEventHandler : EfCoreDatabaseMigrationEventH
IAbpDistributedLock abpDistributedLock,
IDistributedEventBus distributedEventBus,
ILoggerFactory loggerFactory,
- BackendAdminDataSeeder dataSeeder)
+ AdminServiceDataSeeder dataSeeder)
: base(
ConnectionStringNameAttribute.GetConnStringName(),
currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory)
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs
index fdfa390fa..f86e34904 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs
@@ -1,8 +1,6 @@
using LINGYUN.Abp.Data.DbMigrator;
-using LINGYUN.Abp.Saas.Tenants;
using Microsoft.Extensions.Logging;
using System;
-using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
@@ -15,14 +13,10 @@ namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
public class BackendAdminDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency
{
- protected IDataSeeder DataSeeder { get; }
- protected IDbSchemaMigrator DbSchemaMigrator { get; }
- protected ITenantRepository TenantRepository { get; }
+ protected AdminServiceDataSeeder DataSeeder { get; }
public BackendAdminDbMigrationService(
- IDataSeeder dataSeeder,
- IDbSchemaMigrator dbSchemaMigrator,
- ITenantRepository tenantRepository,
+ AdminServiceDataSeeder dataSeeder,
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
IServiceProvider serviceProvider,
@@ -34,25 +28,11 @@ public class BackendAdminDbMigrationService : EfCoreRuntimeDbMigratorBase x.IsActive))
- {
- await LockAndApplyDatabaseWithTenantMigrationsAsync(tenant.Id);
- }
}
protected async override Task SeedAsync()
{
- Logger.LogInformation($"Executing {(!CurrentTenant.IsAvailable ? "host" : CurrentTenant.Name ?? CurrentTenant.GetId().ToString())} database seed...");
-
- await DataSeeder.SeedAsync(CurrentTenant.Id);
+ // DbMigrator迁移数据种子
+ await DataSeeder.SeedAsync(new DataSeedContext());
}
}
\ No newline at end of file
diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs
index d3ba6c223..531a967fa 100644
--- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs
+++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs
@@ -35,7 +35,7 @@ public class BackendAdminMigrationsEntityFrameworkCoreModule : AbpModule
mysql =>
{
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
- mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Parameter);
+ mysql.UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
});
});
}
diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json
index 58c4aa811..cc93682ad 100644
--- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json
+++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json
@@ -1,9 +1,6 @@
{
"ConnectionStrings": {
- "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
- "Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
- "Identity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None",
- "Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
+ "Default": "Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"IdentityServer": {
"Clients": {
diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj
index e96a66775..b74eb1836 100644
--- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj
+++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj
@@ -22,7 +22,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json
index 5134cd6f5..3a9b9034b 100644
--- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json
+++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json
@@ -1,9 +1,6 @@
{
"ConnectionStrings": {
- "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
- "Platform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None",
- "Identity": "Server=127.0.0.1;Database=AuthServer-V70;User Id=root;Password=123456;SslMode=None",
- "Realtime": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
+ "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs
index acd62ada3..a8fa4423b 100644
--- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs
+++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs
@@ -1,9 +1,6 @@
using LINGYUN.Abp.Data.DbMigrator;
-using LINGYUN.Abp.Saas.Tenants;
using Microsoft.Extensions.Logging;
using System;
-using System.Linq;
-using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DistributedLocking;
@@ -15,14 +12,7 @@ namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore;
public class LocalizationManagementDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency
{
- protected IDataSeeder DataSeeder { get; }
- protected IDbSchemaMigrator DbSchemaMigrator { get; }
- protected ITenantRepository TenantRepository { get; }
-
public LocalizationManagementDbMigrationService(
- IDataSeeder dataSeeder,
- IDbSchemaMigrator dbSchemaMigrator,
- ITenantRepository tenantRepository,
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
IServiceProvider serviceProvider,
@@ -33,26 +23,5 @@ public class LocalizationManagementDbMigrationService : EfCoreRuntimeDbMigratorB
ConnectionStringNameAttribute.GetConnStringName(),
unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory)
{
- DataSeeder = dataSeeder;
- DbSchemaMigrator = dbSchemaMigrator;
- TenantRepository = tenantRepository;
- }
-
- protected async override Task LockAndApplyDatabaseMigrationsAsync()
- {
- await base.LockAndApplyDatabaseMigrationsAsync();
-
- var tenants = await TenantRepository.GetListAsync();
- foreach (var tenant in tenants.Where(x => x.IsActive))
- {
- await LockAndApplyDatabaseWithTenantMigrationsAsync(tenant.Id);
- }
- }
-
- protected async override Task SeedAsync()
- {
- Logger.LogInformation($"Executing {(!CurrentTenant.IsAvailable ? "host" : CurrentTenant.Name ?? CurrentTenant.GetId().ToString())} database seed...");
-
- await DataSeeder.SeedAsync(CurrentTenant.Id);
}
}
\ No newline at end of file
diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj
index 5c4f9a294..6e052a446 100644
--- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj
+++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj
@@ -23,7 +23,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json
index 848a0f83b..3a9b9034b 100644
--- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json
+++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
- "Default": "Server=127.0.0.1;Database=abp;User Id=root;Password=123456;SslMode=None"
+ "Default": "Server=localhost;Database=abp;User Id=root;Password=123456;SslMode=None"
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs
new file mode 100644
index 000000000..e4cc7d104
--- /dev/null
+++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20260424033808_Add-Blob-Management-Module.Designer.cs
@@ -0,0 +1,1501 @@
+//
+using System;
+using LY.MicroService.Platform.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations
+{
+ [DbContext(typeof(PlatformMigrationsDbContext))]
+ [Migration("20260424033808_Add-Blob-Management-Module")]
+ partial class AddBlobManagementModule
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
+ .HasAnnotation("ProductVersion", "10.0.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("LINGYUN.Abp.BlobManagement.Blob", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ContainerId")
+ .HasColumnType("char(36)");
+
+ b.Property("ContentType")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DownloadCount")
+ .HasColumnType("bigint");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FullName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("ParentId")
+ .HasColumnType("char(36)");
+
+ b.Property("Provider")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Size")
+ .HasColumnType("bigint");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContainerId");
+
+ b.HasIndex("ParentId");
+
+ b.HasIndex("TenantId", "ContainerId", "FullName");
+
+ b.ToTable("AbpBlobs", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Abp.BlobManagement.BlobContainer", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Provider")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "Name");
+
+ b.ToTable("AbpBlobContainers", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Code");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Description");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsStatic")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("varchar(30)")
+ .HasColumnName("Name");
+
+ b.Property("ParentId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name");
+
+ b.ToTable("AppPlatformDatas", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("AllowBeNull")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(true);
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DataId")
+ .HasColumnType("char(36)");
+
+ b.Property("DefaultValue")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("DefaultValue");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Description");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsStatic")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("varchar(30)")
+ .HasColumnName("Name");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("ValueType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DataId");
+
+ b.HasIndex("Name");
+
+ b.ToTable("AppPlatformDataItems", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Feedbacks.Feedback", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Category")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Category");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Content");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AppPlatformFeedbacks", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackAttachment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("FeedbackId")
+ .HasColumnType("char(36)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("Size")
+ .HasColumnType("bigint");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Url");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FeedbackId");
+
+ b.ToTable("AppPlatformFeedbackAttachments", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Feedbacks.FeedbackComment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Capacity")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Capacity");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Content");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("FeedbackId")
+ .HasColumnType("char(36)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FeedbackId");
+
+ b.ToTable("AppPlatformFeedbackComments", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DataId")
+ .HasColumnType("char(36)");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasColumnType("longtext");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Framework")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Framework");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("Path")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Path");
+
+ b.Property("Redirect")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Redirect");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AppPlatformLayouts", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(23)
+ .HasColumnType("varchar(23)")
+ .HasColumnName("Code");
+
+ b.Property("Component")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Component");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasColumnType("longtext");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Framework")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Framework");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsPublic")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LayoutId")
+ .HasColumnType("char(36)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("ParentId")
+ .HasColumnType("char(36)");
+
+ b.Property("Path")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Path");
+
+ b.Property("Redirect")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Redirect");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AppPlatformMenus", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MenuId")
+ .HasColumnType("char(36)");
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("RoleName");
+
+ b.Property("Startup")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleName", "MenuId");
+
+ b.ToTable("AppPlatformRoleMenus", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Menus.UserFavoriteMenu", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("AliasName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("AliasName");
+
+ b.Property("Color")
+ .HasMaxLength(30)
+ .HasColumnType("varchar(30)")
+ .HasColumnName("Color");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("DisplayName");
+
+ b.Property("Framework")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Framework");
+
+ b.Property("Icon")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)")
+ .HasColumnName("Icon");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MenuId")
+ .HasColumnType("char(36)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Name");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Path");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId", "MenuId");
+
+ b.ToTable("AppPlatformUserFavoriteMenus", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MenuId")
+ .HasColumnType("char(36)");
+
+ b.Property("Startup")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId", "MenuId");
+
+ b.ToTable("AppPlatformUserMenus", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("BodyTransferEncoding")
+ .HasColumnType("int");
+
+ b.Property("CC")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("CC");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("Content");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeliveryNotificationOptions")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("From")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("From");
+
+ b.Property("IsBodyHtml")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Normalize")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Priority")
+ .HasColumnType("int");
+
+ b.Property("Provider")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("Provider");
+
+ b.Property("Reason")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("Reason");
+
+ b.Property("Receiver")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Receiver");
+
+ b.Property("SendCount")
+ .HasColumnType("int");
+
+ b.Property("SendTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Sender")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("Sender");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("Subject")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("Subject");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.ToTable("AppPlatformEmailMessages", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageAttachment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("BlobName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("BlobName");
+
+ b.Property("MessageId")
+ .HasColumnType("char(36)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("Name");
+
+ b.Property("Size")
+ .HasColumnType("bigint");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MessageId");
+
+ b.ToTable("AppPlatformEmailMessageAttachments", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Messages.EmailMessageHeader", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Key")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("Key");
+
+ b.Property("MessageId")
+ .HasColumnType("char(36)");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("Value");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MessageId");
+
+ b.ToTable("AppPlatformEmailMessageHeaders", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Messages.SmsMessage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("Content");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Provider")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("Provider");
+
+ b.Property("Reason")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("Reason");
+
+ b.Property("Receiver")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Receiver");
+
+ b.Property("SendCount")
+ .HasColumnType("int");
+
+ b.Property("SendTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Sender")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("Sender");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("UserId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.ToTable("AppPlatformSmsMessages", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Packages.Package", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Authors")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("Authors");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Description");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("ForceUpdate")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Level")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Name");
+
+ b.Property("Note")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Note");
+
+ b.Property("Version")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("varchar(30)")
+ .HasColumnName("Version");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name", "Version");
+
+ b.ToTable("AppPlatformPackages", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Packages.PackageBlob", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Authors")
+ .HasMaxLength(100)
+ .HasColumnType("varchar(100)")
+ .HasColumnName("Authors");
+
+ b.Property("ContentType")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("ContentType");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DownloadCount")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("License")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("License");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)")
+ .HasColumnName("Name");
+
+ b.Property("PackageId")
+ .HasColumnType("char(36)");
+
+ b.Property("SHA256")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("SHA256");
+
+ b.Property("Size")
+ .HasColumnType("bigint");
+
+ b.Property("Summary")
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)")
+ .HasColumnName("Summary");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Url")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)")
+ .HasColumnName("Url");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PackageId", "Name");
+
+ b.ToTable("AppPlatformPackageBlobs", (string)null);
+ });
+
+ modelBuilder.Entity("LINGYUN.Platform.Portal.Enterprise", b =>
+ {
+ b.Property