committed by
GitHub
118 changed files with 8385 additions and 27050 deletions
@ -0,0 +1,12 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net5.0</TargetFramework> |
||||
|
<RootNamespace /> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.4.0" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
@ -0,0 +1,12 @@ |
|||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Volo.Abp.Modularity; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Data.DbMigrator |
||||
|
{ |
||||
|
[DependsOn( |
||||
|
typeof(AbpEntityFrameworkCoreModule))] |
||||
|
public class AbpDataDbMigratorModule : AbpModule |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
using JetBrains.Annotations; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Data; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Data.DbMigrator |
||||
|
{ |
||||
|
public class DefaultDbSchemaMigrator : IDbSchemaMigrator, ITransientDependency |
||||
|
{ |
||||
|
private readonly IServiceProvider _serviceProvider; |
||||
|
private readonly AbpDbConnectionOptions _dbConnectionOptions; |
||||
|
|
||||
|
public DefaultDbSchemaMigrator( |
||||
|
IServiceProvider serviceProvider, |
||||
|
IOptions<AbpDbConnectionOptions> dbConnectionOptions) |
||||
|
{ |
||||
|
_serviceProvider = serviceProvider; |
||||
|
_dbConnectionOptions = dbConnectionOptions.Value; |
||||
|
} |
||||
|
|
||||
|
public virtual async Task MigrateAsync<TDbContext>( |
||||
|
[NotNull] Func<string, DbContextOptionsBuilder<TDbContext>, TDbContext> configureDbContext) |
||||
|
where TDbContext : AbpDbContext<TDbContext> |
||||
|
{ |
||||
|
var connectionStringResolver = _serviceProvider |
||||
|
.GetRequiredService<IConnectionStringResolver>(); |
||||
|
var connectionString = await connectionStringResolver.ResolveAsync(); |
||||
|
|
||||
|
// 租户连接字符串与默认连接字符串相同,则不执行迁移脚本
|
||||
|
if (string.Equals( |
||||
|
connectionString, |
||||
|
_dbConnectionOptions.ConnectionStrings.Default, |
||||
|
StringComparison.InvariantCultureIgnoreCase)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
var dbContextBuilder = new DbContextOptionsBuilder<TDbContext>(); |
||||
|
using var dbContext = configureDbContext(connectionString, dbContextBuilder); |
||||
|
|
||||
|
await dbContext.Database.MigrateAsync(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using JetBrains.Annotations; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Data.DbMigrator |
||||
|
{ |
||||
|
public interface IDbSchemaMigrator |
||||
|
{ |
||||
|
Task MigrateAsync<TDbContext>( |
||||
|
[NotNull] Func<string, DbContextOptionsBuilder<TDbContext>, TDbContext> configureDbContext) |
||||
|
where TDbContext : AbpDbContext<TDbContext>; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
# LINGYUN.Abp.Data.DbMigrator |
||||
|
|
||||
|
数据迁移模块,用于配合需要提供数据初始化的场景(例如新租户创建时) |
||||
|
|
||||
|
## 配置使用 |
||||
|
|
||||
|
|
||||
|
```csharp |
||||
|
[DependsOn(typeof(AbpDataDbMigratorModule))] |
||||
|
public class YouProjectModule : AbpModule |
||||
|
{ |
||||
|
// other |
||||
|
} |
||||
|
|
||||
|
public class FakeDbContext : AbpDbContext<FakeDbContext> |
||||
|
{ |
||||
|
public FakeDbContext(DbContextOptions<FakeDbContext> options) |
||||
|
: base(options) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class FakeMigretor |
||||
|
{ |
||||
|
private readonly IDbSchemaMigrator _migrator; |
||||
|
|
||||
|
public FakeMigretor( |
||||
|
IDbSchemaMigrator migrator) |
||||
|
{ |
||||
|
_migrator = migrator; |
||||
|
} |
||||
|
|
||||
|
public async Task MigrateAsync() |
||||
|
{ |
||||
|
// 将执行 EF 迁移脚本, 需要提供用作数据迁移的 DbContext |
||||
|
await _migrator.MigrateAsync<FakeDbContext>( |
||||
|
// connectionString: 当前租户连接字符串,用于构建连接 |
||||
|
// builder: 用于初始化上下文的构造器 |
||||
|
(connectionString, builder) => |
||||
|
{ |
||||
|
|
||||
|
// 在委托中由用户决定数据库参数 |
||||
|
builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); |
||||
|
|
||||
|
// 返回实例化的DbContext |
||||
|
return new FakeDbContext(builder.Options); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
@ -0,0 +1,30 @@ |
|||||
|
using Microsoft.Extensions.Options; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Data; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
|
namespace LINGYUN.Abp.OssManagement |
||||
|
{ |
||||
|
public class OssStaticContainerDataSeedContributor : IDataSeedContributor, ITransientDependency |
||||
|
{ |
||||
|
private readonly AbpOssManagementOptions _options; |
||||
|
private readonly IOssContainerFactory _ossContainerFactory; |
||||
|
public OssStaticContainerDataSeedContributor( |
||||
|
IOptions<AbpOssManagementOptions> options, |
||||
|
IOssContainerFactory ossContainerFactory) |
||||
|
{ |
||||
|
_options = options.Value; |
||||
|
_ossContainerFactory = ossContainerFactory; |
||||
|
} |
||||
|
|
||||
|
public virtual async Task SeedAsync(DataSeedContext context) |
||||
|
{ |
||||
|
var ossContainer = _ossContainerFactory.Create(); |
||||
|
|
||||
|
foreach (var bucket in _options.StaticBuckets) |
||||
|
{ |
||||
|
await ossContainer.CreateIfNotExistsAsync(bucket); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,88 +0,0 @@ |
|||||
using LINGYUN.Abp.MultiTenancy; |
|
||||
using Microsoft.AspNetCore.Identity; |
|
||||
using Microsoft.Extensions.Logging; |
|
||||
using System; |
|
||||
using System.Threading.Tasks; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
using Volo.Abp.EventBus.Distributed; |
|
||||
using Volo.Abp.Guids; |
|
||||
using Volo.Abp.Identity; |
|
||||
using Volo.Abp.MultiTenancy; |
|
||||
using Volo.Abp.Uow; |
|
||||
using IdentityRole = Volo.Abp.Identity.IdentityRole; |
|
||||
using IdentityUser = Volo.Abp.Identity.IdentityUser; |
|
||||
|
|
||||
namespace AuthServer.Host.EventBus.Handlers |
|
||||
{ |
|
||||
public class TenantCreateEventHandler : IDistributedEventHandler<CreateEventData>, ITransientDependency |
|
||||
{ |
|
||||
protected ILogger<TenantCreateEventHandler> Logger { get; } |
|
||||
protected ICurrentTenant CurrentTenant { get; } |
|
||||
protected IGuidGenerator GuidGenerator { get; } |
|
||||
protected IdentityUserManager IdentityUserManager { get; } |
|
||||
protected IdentityRoleManager IdentityRoleManager { get; } |
|
||||
|
|
||||
public TenantCreateEventHandler( |
|
||||
ICurrentTenant currentTenant, |
|
||||
IGuidGenerator guidGenerator, |
|
||||
IdentityUserManager identityUserManager, |
|
||||
IdentityRoleManager identityRoleManager, |
|
||||
ILogger<TenantCreateEventHandler> logger) |
|
||||
{ |
|
||||
Logger = logger; |
|
||||
CurrentTenant = currentTenant; |
|
||||
GuidGenerator = guidGenerator; |
|
||||
IdentityUserManager = identityUserManager; |
|
||||
IdentityRoleManager = identityRoleManager; |
|
||||
} |
|
||||
|
|
||||
[UnitOfWork] |
|
||||
public async Task HandleEventAsync(CreateEventData eventData) |
|
||||
{ |
|
||||
using (CurrentTenant.Change(eventData.Id, eventData.Name)) |
|
||||
{ |
|
||||
const string tenantAdminRoleName = "admin"; |
|
||||
var tenantAdminRoleId = Guid.Empty; ; |
|
||||
|
|
||||
if (!await IdentityRoleManager.RoleExistsAsync(tenantAdminRoleName)) |
|
||||
{ |
|
||||
tenantAdminRoleId = GuidGenerator.Create(); |
|
||||
var tenantAdminRole = new IdentityRole(tenantAdminRoleId, tenantAdminRoleName, eventData.Id) |
|
||||
{ |
|
||||
IsStatic = true, |
|
||||
IsPublic = true |
|
||||
}; |
|
||||
(await IdentityRoleManager.CreateAsync(tenantAdminRole)).CheckErrors(); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
var tenantAdminRole = await IdentityRoleManager.FindByNameAsync(tenantAdminRoleName); |
|
||||
tenantAdminRoleId = tenantAdminRole.Id; |
|
||||
} |
|
||||
|
|
||||
var tenantAdminUser = await IdentityUserManager.FindByNameAsync(eventData.AdminEmailAddress); |
|
||||
if (tenantAdminUser == null) |
|
||||
{ |
|
||||
tenantAdminUser = new IdentityUser(eventData.AdminUserId, eventData.AdminEmailAddress, |
|
||||
eventData.AdminEmailAddress, eventData.Id); |
|
||||
|
|
||||
tenantAdminUser.AddRole(tenantAdminRoleId); |
|
||||
|
|
||||
// 创建租户管理用户
|
|
||||
(await IdentityUserManager.CreateAsync(tenantAdminUser)).CheckErrors(); |
|
||||
(await IdentityUserManager.AddPasswordAsync(tenantAdminUser, eventData.AdminPassword)).CheckErrors(); |
|
||||
} |
|
||||
//var identitySeedResult = await IdentityDataSeeder
|
|
||||
// .SeedAsync(eventData.AdminEmailAddress, eventData.AdminPassword, eventData.Id);
|
|
||||
//if (!identitySeedResult.CreatedAdminUser)
|
|
||||
//{
|
|
||||
// Logger.LogWarning("Tenant {0} admin user {1} not created!", eventData.Name, eventData.AdminEmailAddress);
|
|
||||
//}
|
|
||||
//if (!identitySeedResult.CreatedAdminRole)
|
|
||||
//{
|
|
||||
// Logger.LogWarning("Tenant {0} admin role not created!", eventData.Name);
|
|
||||
//}
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,134 @@ |
|||||
|
using AuthServer.EntityFrameworkCore; |
||||
|
using LINGYUN.Abp.Data.DbMigrator; |
||||
|
using LINGYUN.Abp.MultiTenancy; |
||||
|
using Microsoft.AspNetCore.Identity; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Authorization.Permissions; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.EventBus.Distributed; |
||||
|
using Volo.Abp.Guids; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
using Volo.Abp.PermissionManagement; |
||||
|
using Volo.Abp.Uow; |
||||
|
using IdentityRole = Volo.Abp.Identity.IdentityRole; |
||||
|
using IdentityUser = Volo.Abp.Identity.IdentityUser; |
||||
|
|
||||
|
namespace AuthServer.Host.EventBus.Handlers |
||||
|
{ |
||||
|
public class TenantSynchronizer : IDistributedEventHandler<CreateEventData>, ITransientDependency |
||||
|
{ |
||||
|
protected ILogger<TenantSynchronizer> Logger { get; } |
||||
|
protected ICurrentTenant CurrentTenant { get; } |
||||
|
protected IGuidGenerator GuidGenerator { get; } |
||||
|
protected IdentityUserManager IdentityUserManager { get; } |
||||
|
protected IdentityRoleManager IdentityRoleManager { get; } |
||||
|
protected IPermissionDataSeeder PermissionDataSeeder { get; } |
||||
|
protected IDbSchemaMigrator DbSchemaMigrator { get; } |
||||
|
|
||||
|
public TenantSynchronizer( |
||||
|
ICurrentTenant currentTenant, |
||||
|
IGuidGenerator guidGenerator, |
||||
|
IdentityUserManager identityUserManager, |
||||
|
IdentityRoleManager identityRoleManager, |
||||
|
IPermissionDataSeeder permissionDataSeeder, |
||||
|
IDbSchemaMigrator dbSchemaMigrator, |
||||
|
ILogger<TenantSynchronizer> logger) |
||||
|
{ |
||||
|
Logger = logger; |
||||
|
CurrentTenant = currentTenant; |
||||
|
GuidGenerator = guidGenerator; |
||||
|
IdentityUserManager = identityUserManager; |
||||
|
IdentityRoleManager = identityRoleManager; |
||||
|
PermissionDataSeeder = permissionDataSeeder; |
||||
|
DbSchemaMigrator = dbSchemaMigrator; |
||||
|
} |
||||
|
|
||||
|
[UnitOfWork] |
||||
|
public async Task HandleEventAsync(CreateEventData eventData) |
||||
|
{ |
||||
|
using (CurrentTenant.Change(eventData.Id, eventData.Name)) |
||||
|
{ |
||||
|
Logger.LogInformation("Migrating the new tenant database with AuthServer..."); |
||||
|
// 迁移租户数据
|
||||
|
await DbSchemaMigrator.MigrateAsync<AuthServerHostMigrationsDbContext>( |
||||
|
(connectionString, builder) => |
||||
|
{ |
||||
|
builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); |
||||
|
|
||||
|
return new AuthServerHostMigrationsDbContext(builder.Options); |
||||
|
}); |
||||
|
|
||||
|
Logger.LogInformation("Migrated the new tenant database with AuthServer."); |
||||
|
|
||||
|
Logger.LogInformation("Seeding the new tenant admin user and roles..."); |
||||
|
await SeedTenantAdminAsync(eventData); |
||||
|
|
||||
|
Logger.LogInformation("Seeding the new tenant default roles..."); |
||||
|
await SeedTenantDefaultRoleAsync(eventData.Id); |
||||
|
|
||||
|
Logger.LogInformation("The new tenant identity data initialized!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private async Task SeedTenantDefaultRoleAsync(Guid tenantId) |
||||
|
{ |
||||
|
// 默认用户
|
||||
|
var roleId = GuidGenerator.Create(); |
||||
|
var defaultRole = new IdentityRole(roleId, "Users", tenantId) |
||||
|
{ |
||||
|
IsStatic = true, |
||||
|
IsPublic = true, |
||||
|
IsDefault = true, |
||||
|
}; |
||||
|
(await IdentityRoleManager.CreateAsync(defaultRole)).CheckErrors(); |
||||
|
|
||||
|
// 所有用户都应该具有查询用户权限, 用于IM场景
|
||||
|
await PermissionDataSeeder.SeedAsync( |
||||
|
RolePermissionValueProvider.ProviderName, |
||||
|
defaultRole.Name, |
||||
|
new string[] { |
||||
|
IdentityPermissions.UserLookup.Default, |
||||
|
IdentityPermissions.Users.Default |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
private async Task SeedTenantAdminAsync(CreateEventData eventData) |
||||
|
{ |
||||
|
const string tenantAdminRoleName = "admin"; |
||||
|
var tenantAdminRoleId = Guid.Empty; ; |
||||
|
|
||||
|
if (!await IdentityRoleManager.RoleExistsAsync(tenantAdminRoleName)) |
||||
|
{ |
||||
|
tenantAdminRoleId = GuidGenerator.Create(); |
||||
|
var tenantAdminRole = new IdentityRole(tenantAdminRoleId, tenantAdminRoleName, eventData.Id) |
||||
|
{ |
||||
|
IsStatic = true, |
||||
|
IsPublic = true |
||||
|
}; |
||||
|
(await IdentityRoleManager.CreateAsync(tenantAdminRole)).CheckErrors(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var tenantAdminRole = await IdentityRoleManager.FindByNameAsync(tenantAdminRoleName); |
||||
|
tenantAdminRoleId = tenantAdminRole.Id; |
||||
|
} |
||||
|
|
||||
|
var tenantAdminUser = await IdentityUserManager.FindByNameAsync(eventData.AdminEmailAddress); |
||||
|
if (tenantAdminUser == null) |
||||
|
{ |
||||
|
tenantAdminUser = new IdentityUser(eventData.AdminUserId, eventData.AdminEmailAddress, |
||||
|
eventData.AdminEmailAddress, eventData.Id); |
||||
|
|
||||
|
tenantAdminUser.AddRole(tenantAdminRoleId); |
||||
|
|
||||
|
// 创建租户管理用户
|
||||
|
(await IdentityUserManager.CreateAsync(tenantAdminUser)).CheckErrors(); |
||||
|
(await IdentityUserManager.AddPasswordAsync(tenantAdminUser, eventData.AdminPassword)).CheckErrors(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -1,773 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace AuthServer.Migrations |
|
||||
{ |
|
||||
public partial class MigrationIdentityServerMySql : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpClaimTypes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Required = table.Column<bool>(nullable: false), |
|
||||
IsStatic = table.Column<bool>(nullable: false), |
|
||||
Regex = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
RegexDescription = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
ValueType = table.Column<int>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpRoles", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
NormalizedName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
IsDefault = table.Column<bool>(nullable: false), |
|
||||
IsStatic = table.Column<bool>(nullable: false), |
|
||||
IsPublic = table.Column<bool>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpRoles", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUsers", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
Surname = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
Email = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
EmailConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
PasswordHash = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
SecurityStamp = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
PhoneNumber = table.Column<string>(maxLength: 16, nullable: true), |
|
||||
PhoneNumberConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
TwoFactorEnabled = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true), |
|
||||
LockoutEnabled = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
AccessFailedCount = table.Column<int>(nullable: false, defaultValue: 0) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpUsers", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiResources", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
||||
Enabled = table.Column<bool>(nullable: false), |
|
||||
Properties = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClients", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
ClientName = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
||||
ClientUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
LogoUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
Enabled = table.Column<bool>(nullable: false), |
|
||||
ProtocolType = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
RequireClientSecret = table.Column<bool>(nullable: false), |
|
||||
RequireConsent = table.Column<bool>(nullable: false), |
|
||||
AllowRememberConsent = table.Column<bool>(nullable: false), |
|
||||
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false), |
|
||||
RequirePkce = table.Column<bool>(nullable: false), |
|
||||
AllowPlainTextPkce = table.Column<bool>(nullable: false), |
|
||||
AllowAccessTokensViaBrowser = table.Column<bool>(nullable: false), |
|
||||
FrontChannelLogoutUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
FrontChannelLogoutSessionRequired = table.Column<bool>(nullable: false), |
|
||||
BackChannelLogoutUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false), |
|
||||
AllowOfflineAccess = table.Column<bool>(nullable: false), |
|
||||
IdentityTokenLifetime = table.Column<int>(nullable: false), |
|
||||
AccessTokenLifetime = table.Column<int>(nullable: false), |
|
||||
AuthorizationCodeLifetime = table.Column<int>(nullable: false), |
|
||||
ConsentLifetime = table.Column<int>(nullable: true), |
|
||||
AbsoluteRefreshTokenLifetime = table.Column<int>(nullable: false), |
|
||||
SlidingRefreshTokenLifetime = table.Column<int>(nullable: false), |
|
||||
RefreshTokenUsage = table.Column<int>(nullable: false), |
|
||||
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(nullable: false), |
|
||||
RefreshTokenExpiration = table.Column<int>(nullable: false), |
|
||||
AccessTokenType = table.Column<int>(nullable: false), |
|
||||
EnableLocalLogin = table.Column<bool>(nullable: false), |
|
||||
IncludeJwtId = table.Column<bool>(nullable: false), |
|
||||
AlwaysSendClientClaims = table.Column<bool>(nullable: false), |
|
||||
ClientClaimsPrefix = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
PairWiseSubjectSalt = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
UserSsoLifetime = table.Column<int>(nullable: true), |
|
||||
UserCodeType = table.Column<string>(maxLength: 100, nullable: true), |
|
||||
DeviceCodeLifetime = table.Column<int>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClients", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerDeviceFlowCodes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
DeviceCode = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
UserCode = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
SubjectId = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
Expiration = table.Column<DateTime>(nullable: false), |
|
||||
Data = table.Column<string>(maxLength: 50000, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerIdentityResources", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
||||
Enabled = table.Column<bool>(nullable: false), |
|
||||
Required = table.Column<bool>(nullable: false), |
|
||||
Emphasize = table.Column<bool>(nullable: false), |
|
||||
ShowInDiscoveryDocument = table.Column<bool>(nullable: false), |
|
||||
Properties = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerPersistedGrants", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Key = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
Type = table.Column<string>(maxLength: 50, nullable: false), |
|
||||
SubjectId = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
Expiration = table.Column<DateTime>(nullable: true), |
|
||||
Data = table.Column<string>(maxLength: 10000, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpRoleClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ClaimType = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true), |
|
||||
RoleId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ClaimType = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserLogins", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ProviderKey = table.Column<string>(maxLength: 196, nullable: false), |
|
||||
ProviderDisplayName = table.Column<string>(maxLength: 128, nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserRoles", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
RoleId = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserTokens", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Value = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
ApiResourceId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiScopes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ApiResourceId = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
||||
Required = table.Column<bool>(nullable: false), |
|
||||
Emphasize = table.Column<bool>(nullable: false), |
|
||||
ShowInDiscoveryDocument = table.Column<bool>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiSecrets", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 300, nullable: false), |
|
||||
ApiResourceId = table.Column<Guid>(nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
Expiration = table.Column<DateTime>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResou~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 250, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientCorsOrigins", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
Origin = table.Column<string>(maxLength: 150, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Client~", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientGrantTypes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
GrantType = table.Column<string>(maxLength: 250, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientIdPRestrictions", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
Provider = table.Column<string>(maxLength: 200, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_Cl~", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientPostLogoutRedirectUris", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
PostLogoutRedirectUri = table.Column<string>(maxLength: 300, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCli~", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientProperties", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
Key = table.Column<string>(maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 2000, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientRedirectUris", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
RedirectUri = table.Column<string>(maxLength: 300, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clien~", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientScopes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
Scope = table.Column<string>(maxLength: 200, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerClientSecrets", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 300, nullable: false), |
|
||||
ClientId = table.Column<Guid>(nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
Expiration = table.Column<DateTime>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId", |
|
||||
column: x => x.ClientId, |
|
||||
principalTable: "IdentityServerClients", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerIdentityClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
IdentityResourceId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources~", |
|
||||
column: x => x.IdentityResourceId, |
|
||||
principalTable: "IdentityServerIdentityResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiScopeClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(maxLength: 200, nullable: false), |
|
||||
ApiResourceId = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 200, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", |
|
||||
columns: x => new { x.ApiResourceId, x.Name }, |
|
||||
principalTable: "IdentityServerApiScopes", |
|
||||
principalColumns: new[] { "ApiResourceId", "Name" }, |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpRoleClaims_RoleId", |
|
||||
table: "AbpRoleClaims", |
|
||||
column: "RoleId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpRoles_NormalizedName", |
|
||||
table: "AbpRoles", |
|
||||
column: "NormalizedName"); |
|
||||
|
|
||||
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_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"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerClients_ClientId", |
|
||||
table: "IdentityServerClients", |
|
||||
column: "ClientId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_DeviceCode", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
column: "DeviceCode", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_Expiration", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
column: "Expiration"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
column: "UserCode", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerPersistedGrants_Expiration", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
column: "Expiration"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
columns: new[] { "SubjectId", "ClientId", "Type" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpClaimTypes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpRoleClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserLogins"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserTokens"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiScopeClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiSecrets"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientCorsOrigins"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientGrantTypes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientIdPRestrictions"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientPostLogoutRedirectUris"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientProperties"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientRedirectUris"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientScopes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClientSecrets"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerDeviceFlowCodes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerIdentityClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerPersistedGrants"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUsers"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerClients"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerIdentityResources"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiResources"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
File diff suppressed because it is too large
@ -1,199 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace AuthServer.Migrations |
|
||||
{ |
|
||||
public partial class UpgradeAbp290 : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Value", |
|
||||
table: "IdentityServerClientSecrets", |
|
||||
maxLength: 300, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 4000); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "RedirectUri", |
|
||||
table: "IdentityServerClientRedirectUris", |
|
||||
maxLength: 300, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(2000) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 2000); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "PostLogoutRedirectUri", |
|
||||
table: "IdentityServerClientPostLogoutRedirectUris", |
|
||||
maxLength: 300, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(2000) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 2000); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Value", |
|
||||
table: "IdentityServerApiSecrets", |
|
||||
maxLength: 300, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 4000); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpOrganizationUnits", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ParentId = table.Column<Guid>(nullable: true), |
|
||||
Code = table.Column<string>(maxLength: 95, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 128, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", |
|
||||
column: x => x.ParentId, |
|
||||
principalTable: "AbpOrganizationUnits", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Restrict); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpOrganizationUnitRoles", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
RoleId = table.Column<Guid>(nullable: false), |
|
||||
OrganizationUnitId = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserOrganizationUnits", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
OrganizationUnitId = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
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_AbpUserOrganizationUnits_UserId_OrganizationUnitId", |
|
||||
table: "AbpUserOrganizationUnits", |
|
||||
columns: new[] { "UserId", "OrganizationUnitId" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpOrganizationUnitRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserOrganizationUnits"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpOrganizationUnits"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Value", |
|
||||
table: "IdentityServerClientSecrets", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
maxLength: 4000, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 300); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "RedirectUri", |
|
||||
table: "IdentityServerClientRedirectUris", |
|
||||
type: "varchar(2000) CHARACTER SET utf8mb4", |
|
||||
maxLength: 2000, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 300); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "PostLogoutRedirectUri", |
|
||||
table: "IdentityServerClientPostLogoutRedirectUris", |
|
||||
type: "varchar(2000) CHARACTER SET utf8mb4", |
|
||||
maxLength: 2000, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 300); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Value", |
|
||||
table: "IdentityServerApiSecrets", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
maxLength: 4000, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 300); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
File diff suppressed because it is too large
@ -1,236 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace AuthServer.Host.Migrations |
|
||||
{ |
|
||||
public partial class UpgradeAbp310 : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerIdentityResources", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerClients", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerApiResources", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpUsers", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "IsExternal", |
|
||||
table: "AbpUsers", |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpRoles", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(256) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 256); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpOrganizationUnits", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpClaimTypes", |
|
||||
maxLength: 40, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(256) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 256); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpSecurityLogs", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ApplicationName = table.Column<string>(maxLength: 96, nullable: true), |
|
||||
Identity = table.Column<string>(maxLength: 96, nullable: true), |
|
||||
Action = table.Column<string>(maxLength: 96, nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: true), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
TenantName = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ClientId = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
CorrelationId = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
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" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpSecurityLogs"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "IsExternal", |
|
||||
table: "AbpUsers"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerIdentityResources", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerClients", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerApiResources", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpUsers", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpRoles", |
|
||||
type: "varchar(256) CHARACTER SET utf8mb4", |
|
||||
maxLength: 256, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpOrganizationUnits", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AbpClaimTypes", |
|
||||
type: "varchar(256) CHARACTER SET utf8mb4", |
|
||||
maxLength: 256, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 40, |
|
||||
oldNullable: true); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,657 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace AuthServer.Host.Migrations |
|
||||
{ |
|
||||
public partial class UpgradeAbp400 : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", |
|
||||
table: "IdentityServerApiClaims"); |
|
||||
|
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", |
|
||||
table: "IdentityServerApiScopeClaims"); |
|
||||
|
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiSecrets"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerIdentityClaims"); |
|
||||
|
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|
||||
table: "IdentityServerDeviceFlowCodes"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerClientProperties", |
|
||||
table: "IdentityServerClientProperties"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopes", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopeClaims", |
|
||||
table: "IdentityServerApiScopeClaims"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerApiClaims", |
|
||||
table: "IdentityServerApiClaims"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Properties", |
|
||||
table: "IdentityServerIdentityResources"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Name", |
|
||||
table: "IdentityServerApiScopeClaims"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Properties", |
|
||||
table: "IdentityServerApiResources"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "IdentityServerApiClaims", |
|
||||
newName: "IdentityServerApiResourceClaims"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ApiResourceId", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
newName: "Id"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ApiResourceId", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
newName: "ApiScopeId"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<DateTime>( |
|
||||
name: "ConsumedTime", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
type: "datetime(6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Description", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
type: "varchar(200) CHARACTER SET utf8mb4", |
|
||||
maxLength: 200, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SessionId", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
type: "varchar(100) CHARACTER SET utf8mb4", |
|
||||
maxLength: 100, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Description", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
type: "varchar(200) CHARACTER SET utf8mb4", |
|
||||
maxLength: 200, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SessionId", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
type: "varchar(100) CHARACTER SET utf8mb4", |
|
||||
maxLength: 100, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AllowedIdentityTokenSigningAlgorithms", |
|
||||
table: "IdentityServerClients", |
|
||||
type: "varchar(100) CHARACTER SET utf8mb4", |
|
||||
maxLength: 100, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "RequireRequestObject", |
|
||||
table: "IdentityServerClients", |
|
||||
type: "tinyint(1)", |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Value", |
|
||||
table: "IdentityServerClientProperties", |
|
||||
type: "varchar(300) CHARACTER SET utf8mb4", |
|
||||
maxLength: 300, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(2000) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 2000); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "varchar(40) CHARACTER SET utf8mb4", |
|
||||
maxLength: 40, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<DateTime>( |
|
||||
name: "CreationTime", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "datetime(6)", |
|
||||
nullable: false, |
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|
||||
|
|
||||
migrationBuilder.AddColumn<Guid>( |
|
||||
name: "CreatorId", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "char(36)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<Guid>( |
|
||||
name: "DeleterId", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "char(36)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<DateTime>( |
|
||||
name: "DeletionTime", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "datetime(6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "Enabled", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "tinyint(1)", |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ExtraProperties", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "IsDeleted", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "tinyint(1)", |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
|
|
||||
migrationBuilder.AddColumn<DateTime>( |
|
||||
name: "LastModificationTime", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "datetime(6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<Guid>( |
|
||||
name: "LastModifierId", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
type: "char(36)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AllowedAccessTokenSigningAlgorithms", |
|
||||
table: "IdentityServerApiResources", |
|
||||
type: "varchar(100) CHARACTER SET utf8mb4", |
|
||||
maxLength: 100, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "ShowInDiscoveryDocument", |
|
||||
table: "IdentityServerApiResources", |
|
||||
type: "tinyint(1)", |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerClientProperties", |
|
||||
table: "IdentityServerClientProperties", |
|
||||
columns: new[] { "ClientId", "Key", "Value" }); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopes", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
column: "Id"); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopeClaims", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
columns: new[] { "ApiScopeId", "Type" }); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerApiResourceClaims", |
|
||||
table: "IdentityServerApiResourceClaims", |
|
||||
columns: new[] { "ApiResourceId", "Type" }); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpLinkUsers", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
SourceUserId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
SourceTenantId = table.Column<Guid>(type: "char(36)", nullable: true), |
|
||||
TargetUserId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
TargetTenantId = table.Column<Guid>(type: "char(36)", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiResourceProperties", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ApiResourceId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Key = table.Column<string>(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResourc~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiResourceScopes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ApiResourceId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Scope = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_A~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiResourceSecrets", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false), |
|
||||
ApiResourceId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Description = table.Column<string>(type: "varchar(1000) CHARACTER SET utf8mb4", maxLength: 1000, nullable: true), |
|
||||
Expiration = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiScopeProperties", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ApiScopeId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Key = table.Column<string>(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Api~", |
|
||||
column: x => x.ApiScopeId, |
|
||||
principalTable: "IdentityServerApiScopes", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerIdentityResourceClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Type = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false), |
|
||||
IdentityResourceId = table.Column<Guid>(type: "char(36)", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityR~", |
|
||||
column: x => x.IdentityResourceId, |
|
||||
principalTable: "IdentityServerIdentityResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerIdentityResourceProperties", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
IdentityResourceId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Key = table.Column<string>(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdent~", |
|
||||
column: x => x.IdentityResourceId, |
|
||||
principalTable: "IdentityServerIdentityResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", |
|
||||
table: "IdentityServerPersistedGrants", |
|
||||
columns: new[] { "SubjectId", "SessionId", "Type" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
column: "UserCode"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", |
|
||||
table: "AbpLinkUsers", |
|
||||
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_A~", |
|
||||
table: "IdentityServerApiResourceClaims", |
|
||||
column: "ApiResourceId", |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScop~", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
column: "ApiScopeId", |
|
||||
principalTable: "IdentityServerApiScopes", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_A~", |
|
||||
table: "IdentityServerApiResourceClaims"); |
|
||||
|
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScop~", |
|
||||
table: "IdentityServerApiScopeClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpLinkUsers"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiResourceProperties"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiResourceScopes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiResourceSecrets"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerApiScopeProperties"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerIdentityResourceClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "IdentityServerIdentityResourceProperties"); |
|
||||
|
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", |
|
||||
table: "IdentityServerPersistedGrants"); |
|
||||
|
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|
||||
table: "IdentityServerDeviceFlowCodes"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerClientProperties", |
|
||||
table: "IdentityServerClientProperties"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopes", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopeClaims", |
|
||||
table: "IdentityServerApiScopeClaims"); |
|
||||
|
|
||||
migrationBuilder.DropPrimaryKey( |
|
||||
name: "PK_IdentityServerApiResourceClaims", |
|
||||
table: "IdentityServerApiResourceClaims"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ConsumedTime", |
|
||||
table: "IdentityServerPersistedGrants"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Description", |
|
||||
table: "IdentityServerPersistedGrants"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SessionId", |
|
||||
table: "IdentityServerPersistedGrants"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Description", |
|
||||
table: "IdentityServerDeviceFlowCodes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SessionId", |
|
||||
table: "IdentityServerDeviceFlowCodes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AllowedIdentityTokenSigningAlgorithms", |
|
||||
table: "IdentityServerClients"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RequireRequestObject", |
|
||||
table: "IdentityServerClients"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CreationTime", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CreatorId", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "DeleterId", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "DeletionTime", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Enabled", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ExtraProperties", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "IsDeleted", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "LastModificationTime", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "LastModifierId", |
|
||||
table: "IdentityServerApiScopes"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AllowedAccessTokenSigningAlgorithms", |
|
||||
table: "IdentityServerApiResources"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ShowInDiscoveryDocument", |
|
||||
table: "IdentityServerApiResources"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "IdentityServerApiResourceClaims", |
|
||||
newName: "IdentityServerApiClaims"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Id", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
newName: "ApiResourceId"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ApiScopeId", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
newName: "ApiResourceId"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Properties", |
|
||||
table: "IdentityServerIdentityResources", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Value", |
|
||||
table: "IdentityServerClientProperties", |
|
||||
type: "varchar(2000) CHARACTER SET utf8mb4", |
|
||||
maxLength: 2000, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(300) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 300); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Name", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
type: "varchar(200) CHARACTER SET utf8mb4", |
|
||||
maxLength: 200, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Properties", |
|
||||
table: "IdentityServerApiResources", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerClientProperties", |
|
||||
table: "IdentityServerClientProperties", |
|
||||
columns: new[] { "ClientId", "Key" }); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopes", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
columns: new[] { "ApiResourceId", "Name" }); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerApiScopeClaims", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
columns: new[] { "ApiResourceId", "Name", "Type" }); |
|
||||
|
|
||||
migrationBuilder.AddPrimaryKey( |
|
||||
name: "PK_IdentityServerApiClaims", |
|
||||
table: "IdentityServerApiClaims", |
|
||||
columns: new[] { "ApiResourceId", "Type" }); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerApiSecrets", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ApiResourceId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Type = table.Column<string>(type: "varchar(250) CHARACTER SET utf8mb4", maxLength: 250, nullable: false), |
|
||||
Value = table.Column<string>(type: "varchar(300) CHARACTER SET utf8mb4", maxLength: 300, nullable: false), |
|
||||
Description = table.Column<string>(type: "varchar(2000) CHARACTER SET utf8mb4", maxLength: 2000, nullable: true), |
|
||||
Expiration = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResou~", |
|
||||
column: x => x.ApiResourceId, |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "IdentityServerIdentityClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
IdentityResourceId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
Type = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources~", |
|
||||
column: x => x.IdentityResourceId, |
|
||||
principalTable: "IdentityServerIdentityResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|
||||
table: "IdentityServerDeviceFlowCodes", |
|
||||
column: "UserCode", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", |
|
||||
table: "IdentityServerApiClaims", |
|
||||
column: "ApiResourceId", |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", |
|
||||
table: "IdentityServerApiScopeClaims", |
|
||||
columns: new[] { "ApiResourceId", "Name" }, |
|
||||
principalTable: "IdentityServerApiScopes", |
|
||||
principalColumns: new[] { "ApiResourceId", "Name" }, |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", |
|
||||
table: "IdentityServerApiScopes", |
|
||||
column: "ApiResourceId", |
|
||||
principalTable: "IdentityServerApiResources", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
File diff suppressed because it is too large
@ -1,24 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace AuthServer.Host.Migrations |
|
||||
{ |
|
||||
public partial class AddIdentityUserAvatarUrl : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AvatarUrl", |
|
||||
table: "AbpUsers", |
|
||||
type: "varchar(128) CHARACTER SET utf8mb4", |
|
||||
maxLength: 128, |
|
||||
nullable: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AvatarUrl", |
|
||||
table: "AbpUsers"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
File diff suppressed because it is too large
@ -1,11 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Threading.Tasks; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers |
|
||||
{ |
|
||||
public class TenantConnectionStringCreateEventHandler |
|
||||
{ |
|
||||
} |
|
||||
} |
|
||||
@ -1,82 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore; |
|
||||
using System; |
|
||||
using System.Text; |
|
||||
using System.Threading.Tasks; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
using Volo.Abp.Domain.Entities.Events.Distributed; |
|
||||
using Volo.Abp.Domain.Repositories; |
|
||||
using Volo.Abp.EventBus.Distributed; |
|
||||
using Volo.Abp.Guids; |
|
||||
using Volo.Abp.MultiTenancy; |
|
||||
using Volo.Abp.PermissionManagement; |
|
||||
using Volo.Abp.TenantManagement; |
|
||||
using Volo.Abp.Uow; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers |
|
||||
{ |
|
||||
public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency |
|
||||
{ |
|
||||
protected ICurrentTenant CurrentTenant { get; } |
|
||||
protected IGuidGenerator GuidGenerator { get; } |
|
||||
protected IUnitOfWorkManager UnitOfWorkManager { get; } |
|
||||
protected IPermissionGrantRepository PermissionGrantRepository { get; } |
|
||||
public TenantDeleteEventHandler( |
|
||||
ICurrentTenant currentTenant, |
|
||||
IGuidGenerator guidGenerator, |
|
||||
IUnitOfWorkManager unitOfWorkManager, |
|
||||
IPermissionGrantRepository permissionGrantRepository) |
|
||||
{ |
|
||||
CurrentTenant = currentTenant; |
|
||||
GuidGenerator = guidGenerator; |
|
||||
UnitOfWorkManager = unitOfWorkManager; |
|
||||
PermissionGrantRepository = permissionGrantRepository; |
|
||||
} |
|
||||
|
|
||||
public async Task HandleEventAsync(EntityDeletedEto<TenantEto> eventData) |
|
||||
{ |
|
||||
using var unitOfWork = UnitOfWorkManager.Begin(); |
|
||||
// 订阅租户删除事件,删除管理员角色所有权限
|
|
||||
// TODO: 租户貌似不存在了,删除应该会失败
|
|
||||
// 有缓存存在的话,可以获取到租户连接字符串
|
|
||||
using (CurrentTenant.Change(eventData.Entity.Id)) |
|
||||
{ |
|
||||
// var grantPermissions = await PermissionGrantRepository.GetListAsync("R", "admin");
|
|
||||
|
|
||||
// EfCore MySql 批量删除还是一条一条的语句?
|
|
||||
// PermissionGrantRepository.GetDbSet().RemoveRange(grantPermissions);
|
|
||||
var dbContext = await PermissionGrantRepository.GetDbContextAsync(); |
|
||||
var permissionEntityType = dbContext.Model.FindEntityType(typeof(PermissionGrant)); |
|
||||
var permissionTableName = permissionEntityType.GetTableName(); |
|
||||
var batchRmovePermissionSql = string.Empty; |
|
||||
if (dbContext.Database.IsMySql()) |
|
||||
{ |
|
||||
batchRmovePermissionSql = BuildMySqlBatchDeleteScript(permissionTableName, eventData.Entity.Id); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
batchRmovePermissionSql = BuildSqlServerBatchDeleteScript(permissionTableName, eventData.Entity.Id); |
|
||||
} |
|
||||
|
|
||||
await dbContext.Database.ExecuteSqlRawAsync(batchRmovePermissionSql); |
|
||||
|
|
||||
await unitOfWork.SaveChangesAsync(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
protected virtual string BuildMySqlBatchDeleteScript(string tableName, Guid tenantId) |
|
||||
{ |
|
||||
var batchRemovePermissionSql = new StringBuilder(128); |
|
||||
batchRemovePermissionSql.AppendLine($"DELETE FROM `{tableName}` WHERE `TenantId` = '{tenantId}'"); |
|
||||
batchRemovePermissionSql.AppendLine("AND `ProviderName`='R' AND `ProviderKey`='admin'"); |
|
||||
return batchRemovePermissionSql.ToString(); |
|
||||
} |
|
||||
|
|
||||
protected virtual string BuildSqlServerBatchDeleteScript(string tableName, Guid tenantId) |
|
||||
{ |
|
||||
var batchRemovePermissionSql = new StringBuilder(128); |
|
||||
batchRemovePermissionSql.AppendLine($"DELETE {tableName} WHERE TenantId = '{tenantId}'"); |
|
||||
batchRemovePermissionSql.AppendLine("AND ProviderName='R' AND ProviderKey='admin'"); |
|
||||
return batchRemovePermissionSql.ToString(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,175 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(BackendAdminHostMigrationsDbContext))] |
|
||||
[Migration("20200804085641_Migration-Backend-Admin-MySql")] |
|
||||
partial class MigrationBackendAdminMySql |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.5") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpPermissionGrants"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AbpTenants"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|
||||
{ |
|
||||
b.Property<Guid>("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.HasKey("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AbpTenantConnectionStrings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.TenantManagement.Tenant", null) |
|
||||
.WithMany("ConnectionStrings") |
|
||||
.HasForeignKey("TenantId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,111 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.Migrations |
|
||||
{ |
|
||||
public partial class MigrationBackendAdminMySql : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpPermissionGrants", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpSettings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 2048, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpTenants", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpTenants", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpTenantConnectionStrings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
TenantId = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 1024, nullable: false) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpPermissionGrants", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpSettings", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpTenants_Name", |
|
||||
table: "AbpTenants", |
|
||||
column: "Name"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpPermissionGrants"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpSettings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpTenantConnectionStrings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpTenants"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,37 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.Migrations |
|
||||
{ |
|
||||
public partial class Addabpfeaturemodule : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpFeatureValues", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpFeatureValues", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpFeatureValues"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,485 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(BackendAdminHostMigrationsDbContext))] |
|
||||
[Migration("20200928020134_Add-abp-audit-logging-module")] |
|
||||
partial class Addabpauditloggingmodule |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.7") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ApplicationName") |
|
||||
.HasColumnName("ApplicationName") |
|
||||
.HasColumnType("varchar(96) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(96); |
|
||||
|
|
||||
b.Property<string>("BrowserInfo") |
|
||||
.HasColumnName("BrowserInfo") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<string>("ClientId") |
|
||||
.HasColumnName("ClientId") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ClientIpAddress") |
|
||||
.HasColumnName("ClientIpAddress") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ClientName") |
|
||||
.HasColumnName("ClientName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("Comments") |
|
||||
.HasColumnName("Comments") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<string>("CorrelationId") |
|
||||
.HasColumnName("CorrelationId") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Exceptions") |
|
||||
.HasColumnName("Exceptions") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(4000); |
|
||||
|
|
||||
b.Property<int>("ExecutionDuration") |
|
||||
.HasColumnName("ExecutionDuration") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("ExecutionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("HttpMethod") |
|
||||
.HasColumnName("HttpMethod") |
|
||||
.HasColumnType("varchar(16) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(16); |
|
||||
|
|
||||
b.Property<int?>("HttpStatusCode") |
|
||||
.HasColumnName("HttpStatusCode") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("ImpersonatorTenantId") |
|
||||
.HasColumnName("ImpersonatorTenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("ImpersonatorUserId") |
|
||||
.HasColumnName("ImpersonatorUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("TenantName") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("Url") |
|
||||
.HasColumnName("Url") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("UserId") |
|
||||
.HasColumnName("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.HasColumnName("UserName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ExecutionTime"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "ExecutionTime"); |
|
||||
|
|
||||
b.ToTable("AbpAuditLogs"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("AuditLogId") |
|
||||
.HasColumnName("AuditLogId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("ExecutionDuration") |
|
||||
.HasColumnName("ExecutionDuration") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("ExecutionTime") |
|
||||
.HasColumnName("ExecutionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("MethodName") |
|
||||
.HasColumnName("MethodName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("Parameters") |
|
||||
.HasColumnName("Parameters") |
|
||||
.HasColumnType("varchar(2000) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2000); |
|
||||
|
|
||||
b.Property<string>("ServiceName") |
|
||||
.HasColumnName("ServiceName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AuditLogId"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); |
|
||||
|
|
||||
b.ToTable("AbpAuditLogActions"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("AuditLogId") |
|
||||
.HasColumnName("AuditLogId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("ChangeTime") |
|
||||
.HasColumnName("ChangeTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<byte>("ChangeType") |
|
||||
.HasColumnName("ChangeType") |
|
||||
.HasColumnType("tinyint unsigned"); |
|
||||
|
|
||||
b.Property<string>("EntityId") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("EntityId") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<Guid?>("EntityTenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("EntityTypeFullName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("EntityTypeFullName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AuditLogId"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); |
|
||||
|
|
||||
b.ToTable("AbpEntityChanges"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("EntityChangeId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NewValue") |
|
||||
.HasColumnName("NewValue") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<string>("OriginalValue") |
|
||||
.HasColumnName("OriginalValue") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<string>("PropertyName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("PropertyName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("PropertyTypeFullName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("PropertyTypeFullName") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("EntityChangeId"); |
|
||||
|
|
||||
b.ToTable("AbpEntityPropertyChanges"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpFeatureValues"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpPermissionGrants"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AbpTenants"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|
||||
{ |
|
||||
b.Property<Guid>("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.HasKey("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AbpTenantConnectionStrings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
|
||||
.WithMany("Actions") |
|
||||
.HasForeignKey("AuditLogId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
|
||||
.WithMany("EntityChanges") |
|
||||
.HasForeignKey("AuditLogId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) |
|
||||
.WithMany("PropertyChanges") |
|
||||
.HasForeignKey("EntityChangeId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.TenantManagement.Tenant", null) |
|
||||
.WithMany("ConnectionStrings") |
|
||||
.HasForeignKey("TenantId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,166 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.BackendAdmin.Migrations |
|
||||
{ |
|
||||
public partial class Addabpauditloggingmodule : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpAuditLogs", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
ApplicationName = table.Column<string>(maxLength: 96, nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: true), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
TenantName = table.Column<string>(nullable: true), |
|
||||
ImpersonatorUserId = table.Column<Guid>(nullable: true), |
|
||||
ImpersonatorTenantId = table.Column<Guid>(nullable: true), |
|
||||
ExecutionTime = table.Column<DateTime>(nullable: false), |
|
||||
ExecutionDuration = table.Column<int>(nullable: false), |
|
||||
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ClientName = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
ClientId = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
CorrelationId = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
HttpMethod = table.Column<string>(maxLength: 16, nullable: true), |
|
||||
Url = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
Exceptions = table.Column<string>(maxLength: 4000, nullable: true), |
|
||||
Comments = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
HttpStatusCode = table.Column<int>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpAuditLogActions", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
AuditLogId = table.Column<Guid>(nullable: false), |
|
||||
ServiceName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
MethodName = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
Parameters = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
ExecutionTime = table.Column<DateTime>(nullable: false), |
|
||||
ExecutionDuration = table.Column<int>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpEntityChanges", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
AuditLogId = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ChangeTime = table.Column<DateTime>(nullable: false), |
|
||||
ChangeType = table.Column<byte>(nullable: false), |
|
||||
EntityTenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityId = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpEntityPropertyChanges", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityChangeId = table.Column<Guid>(nullable: false), |
|
||||
NewValue = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
OriginalValue = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
PropertyName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
PropertyTypeFullName = table.Column<string>(maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
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); |
|
||||
}); |
|
||||
|
|
||||
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_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"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpAuditLogActions"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpEntityPropertyChanges"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpEntityChanges"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpAuditLogs"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,158 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace LINGYUN.Abp.BackendAdmin.Migrations |
||||
|
{ |
||||
|
public partial class ReInitlizeDbMigration : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AlterDatabase() |
||||
|
.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: "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: "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: "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.CreateIndex( |
||||
|
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpFeatureValues", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpPermissionGrants", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpSettings", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpTenants_Name", |
||||
|
table: "AbpTenants", |
||||
|
column: "Name"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpFeatureValues"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpPermissionGrants"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpSettings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpTenantConnectionStrings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpTenants"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
using LINGYUN.Abp.Data.DbMigrator; |
||||
|
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; |
||||
|
using LINGYUN.Abp.MultiTenancy; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.EventBus.Distributed; |
||||
|
using Volo.Abp.MultiTenancy; |
||||
|
using Volo.Abp.Uow; |
||||
|
|
||||
|
namespace LINGYUN.Abp.LocalizationManagement.EventBus.Handlers |
||||
|
{ |
||||
|
public class TenantSynchronizer : IDistributedEventHandler<CreateEventData>, ITransientDependency |
||||
|
{ |
||||
|
protected ILogger<TenantSynchronizer> Logger { get; } |
||||
|
|
||||
|
protected ICurrentTenant CurrentTenant { get; } |
||||
|
protected IUnitOfWorkManager UnitOfWorkManager { get; } |
||||
|
protected IDbSchemaMigrator DbSchemaMigrator { get; } |
||||
|
public TenantSynchronizer( |
||||
|
ICurrentTenant currentTenant, |
||||
|
IUnitOfWorkManager unitOfWorkManager, |
||||
|
IDbSchemaMigrator dbSchemaMigrator, |
||||
|
ILogger<TenantSynchronizer> logger) |
||||
|
{ |
||||
|
CurrentTenant = currentTenant; |
||||
|
UnitOfWorkManager = unitOfWorkManager; |
||||
|
DbSchemaMigrator = dbSchemaMigrator; |
||||
|
|
||||
|
Logger = logger; |
||||
|
} |
||||
|
|
||||
|
public async Task HandleEventAsync(CreateEventData eventData) |
||||
|
{ |
||||
|
using (var unitOfWork = UnitOfWorkManager.Begin()) |
||||
|
{ |
||||
|
using (CurrentTenant.Change(eventData.Id, eventData.Name)) |
||||
|
{ |
||||
|
Logger.LogInformation("Migrating the new tenant database with localization.."); |
||||
|
// 迁移租户数据
|
||||
|
await DbSchemaMigrator.MigrateAsync<LocalizationManagementHttpApiHostMigrationsDbContext>( |
||||
|
(connectionString, builder) => |
||||
|
{ |
||||
|
builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); |
||||
|
|
||||
|
return new LocalizationManagementHttpApiHostMigrationsDbContext(builder.Options); |
||||
|
}); |
||||
|
await unitOfWork.SaveChangesAsync(); |
||||
|
|
||||
|
Logger.LogInformation("Migrated the new tenant database with localization."); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,130 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20200601060701_Add-Abp-Message-Service-Module")] |
|
||||
partial class AddAbpMessageServiceModule |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("ProductVersion", "3.1.3") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("ReadStatus") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,93 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class AddAbpMessageServiceModule : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppNotifications", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Severity = table.Column<sbyte>(nullable: false), |
|
||||
Type = table.Column<int>(nullable: false), |
|
||||
NotificationId = table.Column<long>(nullable: false), |
|
||||
NotificationName = table.Column<string>(maxLength: 100, nullable: false), |
|
||||
NotificationData = table.Column<string>(maxLength: 1048576, nullable: false), |
|
||||
NotificationTypeName = table.Column<string>(maxLength: 512, nullable: false), |
|
||||
ExpirationTime = table.Column<DateTime>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppNotifications", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserNotifications", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
NotificationId = table.Column<long>(nullable: false), |
|
||||
ReadStatus = table.Column<sbyte>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserNotifications", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserSubscribes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
NotificationName = table.Column<string>(maxLength: 100, nullable: false), |
|
||||
UserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserSubscribes", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppNotifications_NotificationName", |
|
||||
table: "AppNotifications", |
|
||||
column: "NotificationName"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Tenant_User_Notification_Id", |
|
||||
table: "AppUserNotifications", |
|
||||
columns: new[] { "TenantId", "UserId", "NotificationId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Tenant_User_Notification_Name", |
|
||||
table: "AppUserSubscribes", |
|
||||
columns: new[] { "TenantId", "UserId", "NotificationName" }, |
|
||||
unique: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppNotifications"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserNotifications"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserSubscribes"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,494 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20200602134027_Add-Chat-Message-Entites")] |
|
||||
partial class AddChatMessageEntites |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("ProductVersion", "3.1.3") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Address") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("MaxUserCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.Property<string>("Notice") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Tag") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AppChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddPeople") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowDissolveGroup") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowKickPeople") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendNotice") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSilence") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("IsSuperAdmin") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppChatGroupAdmins"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatSetting", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddFriend") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowReceiveMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("RequireAddFriendValition") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ReceiveUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ReceiveUserId"); |
|
||||
|
|
||||
b.ToTable("AppUserMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("FocusUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserSpecialFocuss"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("ReadStatus") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,281 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class AddChatMessageEntites : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "ReadStatus", |
|
||||
table: "AppUserNotifications", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(sbyte), |
|
||||
oldType: "tinyint"); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppChatGroupAdmins", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
GroupId = table.Column<long>(nullable: false), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
IsSuperAdmin = table.Column<bool>(nullable: false), |
|
||||
AllowSilence = table.Column<bool>(nullable: false), |
|
||||
AllowKickPeople = table.Column<bool>(nullable: false), |
|
||||
AllowAddPeople = table.Column<bool>(nullable: false), |
|
||||
AllowSendNotice = table.Column<bool>(nullable: false), |
|
||||
AllowDissolveGroup = table.Column<bool>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppChatGroupAdmins", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppChatGroups", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
GroupId = table.Column<long>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 20, nullable: false), |
|
||||
Tag = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
Address = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
Notice = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
MaxUserCount = table.Column<int>(nullable: false), |
|
||||
AllowAnonymous = table.Column<bool>(nullable: false), |
|
||||
AllowSendMessage = table.Column<bool>(nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 128, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppChatGroups", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppGroupChatBlacks", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
GroupId = table.Column<long>(nullable: false), |
|
||||
ShieldUserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppGroupChatBlacks", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppGroupMessages", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
MessageId = table.Column<long>(nullable: false), |
|
||||
SendUserName = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Content = table.Column<string>(maxLength: 1048576, nullable: false), |
|
||||
Type = table.Column<int>(nullable: false), |
|
||||
SendState = table.Column<sbyte>(nullable: false), |
|
||||
GroupId = table.Column<long>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppGroupMessages", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserChatBlacks", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
ShieldUserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserChatBlacks", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserChatGroups", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
GroupId = table.Column<long>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserChatGroups", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserChatSettings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
AllowAnonymous = table.Column<bool>(nullable: false), |
|
||||
AllowAddFriend = table.Column<bool>(nullable: false), |
|
||||
RequireAddFriendValition = table.Column<bool>(nullable: false), |
|
||||
AllowReceiveMessage = table.Column<bool>(nullable: false), |
|
||||
AllowSendMessage = table.Column<bool>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserChatSettings", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserMessages", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
MessageId = table.Column<long>(nullable: false), |
|
||||
SendUserName = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Content = table.Column<string>(maxLength: 1048576, nullable: false), |
|
||||
Type = table.Column<int>(nullable: false), |
|
||||
SendState = table.Column<sbyte>(nullable: false), |
|
||||
ReceiveUserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserMessages", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserSpecialFocuss", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
FocusUserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserSpecialFocuss", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppChatGroupAdmins_TenantId_GroupId", |
|
||||
table: "AppChatGroupAdmins", |
|
||||
columns: new[] { "TenantId", "GroupId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppChatGroups_TenantId_Name", |
|
||||
table: "AppChatGroups", |
|
||||
columns: new[] { "TenantId", "Name" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppGroupChatBlacks_TenantId_GroupId", |
|
||||
table: "AppGroupChatBlacks", |
|
||||
columns: new[] { "TenantId", "GroupId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppGroupMessages_TenantId_GroupId", |
|
||||
table: "AppGroupMessages", |
|
||||
columns: new[] { "TenantId", "GroupId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserChatBlacks_TenantId_UserId", |
|
||||
table: "AppUserChatBlacks", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserChatGroups_TenantId_GroupId_UserId", |
|
||||
table: "AppUserChatGroups", |
|
||||
columns: new[] { "TenantId", "GroupId", "UserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserChatSettings_TenantId_UserId", |
|
||||
table: "AppUserChatSettings", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserMessages_TenantId_ReceiveUserId", |
|
||||
table: "AppUserMessages", |
|
||||
columns: new[] { "TenantId", "ReceiveUserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserSpecialFocuss_TenantId_UserId", |
|
||||
table: "AppUserSpecialFocuss", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppChatGroupAdmins"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppChatGroups"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppGroupChatBlacks"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppGroupMessages"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserChatBlacks"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserChatGroups"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserChatSettings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserMessages"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserSpecialFocuss"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<sbyte>( |
|
||||
name: "ReadStatus", |
|
||||
table: "AppUserNotifications", |
|
||||
type: "tinyint", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int)); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,503 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20200609151853_Create-User-Subscription-Column-UserName")] |
|
||||
partial class CreateUserSubscriptionColumnUserName |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.4") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Address") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("MaxUserCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.Property<string>("Notice") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Tag") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AppChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddPeople") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowDissolveGroup") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowKickPeople") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendNotice") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSilence") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("IsSuperAdmin") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppChatGroupAdmins"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatSetting", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddFriend") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowReceiveMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("RequireAddFriendValition") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ReceiveUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ReceiveUserId"); |
|
||||
|
|
||||
b.ToTable("AppUserMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("FocusUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserSpecialFocuss"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("ReadStatus") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128) |
|
||||
.HasDefaultValue("/"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class CreateUserSubscriptionColumnUserName : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "UserName", |
|
||||
table: "AppUserSubscribes", |
|
||||
maxLength: 128, |
|
||||
nullable: false, |
|
||||
defaultValue: "/"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UserName", |
|
||||
table: "AppUserSubscribes"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,508 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20200617010925_Add-Notification-Column-CateGory")] |
|
||||
partial class AddNotificationColumnCateGory |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.4") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Address") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("MaxUserCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.Property<string>("Notice") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Tag") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AppChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.ChatGroupAdmin", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddPeople") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowDissolveGroup") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowKickPeople") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendNotice") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSilence") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("IsSuperAdmin") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppChatGroupAdmins"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.GroupMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserChatSetting", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddFriend") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowReceiveMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("RequireAddFriendValition") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ReceiveUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ReceiveUserId"); |
|
||||
|
|
||||
b.ToTable("AppUserMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Messages.UserSpecialFocus", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("FocusUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserSpecialFocuss"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationCateGory") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("ReadStatus") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128) |
|
||||
.HasDefaultValue("/"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,42 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class AddNotificationColumnCateGory : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_AppNotifications_NotificationName", |
|
||||
table: "AppNotifications"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "NotificationCateGory", |
|
||||
table: "AppNotifications", |
|
||||
maxLength: 50, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppNotifications_TenantId_NotificationName", |
|
||||
table: "AppNotifications", |
|
||||
columns: new[] { "TenantId", "NotificationName" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_AppNotifications_TenantId_NotificationName", |
|
||||
table: "AppNotifications"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "NotificationCateGory", |
|
||||
table: "AppNotifications"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppNotifications_NotificationName", |
|
||||
table: "AppNotifications", |
|
||||
column: "NotificationName"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,590 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20201024093309_Add-MemberCard-Entity")] |
|
||||
partial class AddMemberCardEntity |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.7") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.ChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Address") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid>("AdminUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("MaxUserCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.Property<string>("Notice") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Tag") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AppChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("Age") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("AvatarUrl") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<DateTime?>("Birthday") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NickName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<int>("Sex") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Sign") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatCards"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddFriend") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowReceiveMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("RequireAddFriendValition") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserGroupCard", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsAdmin") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NickName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<DateTime?>("SilenceEnd") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserGroupCards"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ReceiveUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ReceiveUserId"); |
|
||||
|
|
||||
b.ToTable("AppUserMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserSpecialFocus", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("FocusUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserSpecialFocuss"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationCateGory") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("ReadStatus") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128) |
|
||||
.HasDefaultValue("/"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,125 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class AddMemberCardEntity : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppChatGroupAdmins"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<Guid>( |
|
||||
name: "AdminUserId", |
|
||||
table: "AppChatGroups", |
|
||||
nullable: false, |
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserChatCards", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Sex = table.Column<int>(nullable: false), |
|
||||
Sign = table.Column<string>(maxLength: 30, nullable: true), |
|
||||
NickName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 50, nullable: true), |
|
||||
AvatarUrl = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
Birthday = table.Column<DateTime>(nullable: true), |
|
||||
Age = table.Column<int>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserChatCards", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserGroupCards", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
NickName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
IsAdmin = table.Column<bool>(nullable: false), |
|
||||
SilenceEnd = table.Column<DateTime>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserGroupCards", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserChatCards_TenantId_UserId", |
|
||||
table: "AppUserChatCards", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserGroupCards_TenantId_UserId", |
|
||||
table: "AppUserGroupCards", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserChatCards"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserGroupCards"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AdminUserId", |
|
||||
table: "AppChatGroups"); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppChatGroupAdmins", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(type: "bigint", nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
AllowAddPeople = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
AllowDissolveGroup = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
AllowKickPeople = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
AllowSendNotice = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
AllowSilence = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|
||||
CreatorId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
GroupId = table.Column<long>(type: "bigint", nullable: false), |
|
||||
IsSuperAdmin = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
LastModifierId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
TenantId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
UserId = table.Column<string>(type: "char(36)", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppChatGroupAdmins", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppChatGroupAdmins_TenantId_GroupId", |
|
||||
table: "AppChatGroupAdmins", |
|
||||
columns: new[] { "TenantId", "GroupId" }); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,634 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20201024114206_Add-UserChatFriend-Entity")] |
|
||||
partial class AddUserChatFriendEntity |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.7") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.ChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Address") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid>("AdminUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("MaxUserCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.Property<string>("Notice") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Tag") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AppChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.GroupMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("Age") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("AvatarUrl") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<DateTime?>("Birthday") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NickName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<int>("Sex") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Sign") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatCards"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("Black") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("DontDisturb") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid>("FrientId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RemarkName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("SpecialFocus") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "FrientId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatFriends"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddFriend") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowReceiveMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("RequireAddFriendValition") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserGroupCard", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsAdmin") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NickName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<DateTime?>("SilenceEnd") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserGroupCards"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ReceiveUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ReceiveUserId"); |
|
||||
|
|
||||
b.ToTable("AppUserMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserSpecialFocus", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("FocusUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserSpecialFocuss"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationCateGory") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("ReadStatus") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128) |
|
||||
.HasDefaultValue("/"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,44 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class AddUserChatFriendEntity : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserChatFriends", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
FrientId = table.Column<Guid>(nullable: false), |
|
||||
Black = table.Column<bool>(nullable: false), |
|
||||
DontDisturb = table.Column<bool>(nullable: false), |
|
||||
SpecialFocus = table.Column<bool>(nullable: false), |
|
||||
RemarkName = table.Column<string>(maxLength: 256, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserChatFriends", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserChatFriends_TenantId_UserId_FrientId", |
|
||||
table: "AppUserChatFriends", |
|
||||
columns: new[] { "TenantId", "UserId", "FrientId" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserChatFriends"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,588 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Abp.MessageService.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(MessageServiceHostMigrationsDbContext))] |
|
||||
[Migration("20201029102936_Add-UserChatFriend-Column-Description")] |
|
||||
partial class AddUserChatFriendColumnDescription |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.7") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatCard", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("Age") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("AvatarUrl") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<DateTime?>("Birthday") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NickName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<int>("Sex") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Sign") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatCards"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatFriend", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("Black") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<bool>("DontDisturb") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<Guid>("FrientId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RemarkName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("SpecialFocus") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<byte>("Status") |
|
||||
.HasColumnType("tinyint unsigned"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "FrientId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatFriends"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserChatSetting", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<bool>("AllowAddFriend") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowReceiveMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("RequireAddFriendValition") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Chat.UserMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ReceiveUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "ReceiveUserId"); |
|
||||
|
|
||||
b.ToTable("AppUserMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.ChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Address") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid>("AdminUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AllowAnonymous") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("AllowSendMessage") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("MaxUserCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.Property<string>("Notice") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Tag") |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "Name"); |
|
||||
|
|
||||
b.ToTable("AppChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.GroupChatBlack", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid>("ShieldUserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupChatBlacks"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.GroupMessage", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("Content") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("MessageId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<sbyte>("SendState") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<string>("SendUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId"); |
|
||||
|
|
||||
b.ToTable("AppGroupMessages"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.UserChatGroup", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<long>("GroupId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "GroupId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserChatGroups"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Group.UserGroupCard", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsAdmin") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("NickName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<DateTime?>("SilenceEnd") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AppUserGroupCards"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.Notification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<DateTime?>("ExpirationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationData") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1048576); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<string>("NotificationTypeName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(512) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<sbyte>("Severity") |
|
||||
.HasColumnType("tinyint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Type") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "NotificationName"); |
|
||||
|
|
||||
b.ToTable("AppNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Notifications.UserNotification", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<long>("NotificationId") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<int>("ReadStatus") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationId") |
|
||||
.HasName("IX_Tenant_User_Notification_Id"); |
|
||||
|
|
||||
b.ToTable("AppUserNotifications"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Abp.MessageService.Subscriptions.UserSubscribe", b => |
|
||||
{ |
|
||||
b.Property<long>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("NotificationName") |
|
||||
.IsRequired() |
|
||||
.HasColumnType("varchar(100) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(100); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128) |
|
||||
.HasDefaultValue("/"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("TenantId", "UserId", "NotificationName") |
|
||||
.IsUnique() |
|
||||
.HasName("IX_Tenant_User_Notification_Name"); |
|
||||
|
|
||||
b.ToTable("AppUserSubscribes"); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,116 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class AddUserChatFriendColumnDescription : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserChatBlacks"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppUserSpecialFocuss"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "NotificationCateGory", |
|
||||
table: "AppNotifications"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AppUserChatFriends", |
|
||||
maxLength: 40, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Description", |
|
||||
table: "AppUserChatFriends", |
|
||||
maxLength: 50, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ExtraProperties", |
|
||||
table: "AppUserChatFriends", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<byte>( |
|
||||
name: "Status", |
|
||||
table: "AppUserChatFriends", |
|
||||
nullable: false, |
|
||||
defaultValue: (byte)0); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AppUserChatFriends"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Description", |
|
||||
table: "AppUserChatFriends"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ExtraProperties", |
|
||||
table: "AppUserChatFriends"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Status", |
|
||||
table: "AppUserChatFriends"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "NotificationCateGory", |
|
||||
table: "AppNotifications", |
|
||||
type: "varchar(50) CHARACTER SET utf8mb4", |
|
||||
maxLength: 50, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserChatBlacks", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(type: "bigint", nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true), |
|
||||
ShieldUserId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: true), |
|
||||
UserId = table.Column<Guid>(type: "char(36)", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserChatBlacks", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppUserSpecialFocuss", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<long>(type: "bigint", nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true), |
|
||||
FocusUserId = table.Column<Guid>(type: "char(36)", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: true), |
|
||||
UserId = table.Column<Guid>(type: "char(36)", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppUserSpecialFocuss", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserChatBlacks_TenantId_UserId", |
|
||||
table: "AppUserChatBlacks", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppUserSpecialFocuss_TenantId_UserId", |
|
||||
table: "AppUserSpecialFocuss", |
|
||||
columns: new[] { "TenantId", "UserId" }); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.MessageService.Migrations |
|
||||
{ |
|
||||
public partial class BasedMessageEntityToAggregateRoot : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AppUserMessages", |
|
||||
maxLength: 40, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ExtraProperties", |
|
||||
table: "AppUserMessages", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AppGroupMessages", |
|
||||
maxLength: 40, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ExtraProperties", |
|
||||
table: "AppGroupMessages", |
|
||||
nullable: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AppUserMessages"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ExtraProperties", |
|
||||
table: "AppUserMessages"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ConcurrencyStamp", |
|
||||
table: "AppGroupMessages"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ExtraProperties", |
|
||||
table: "AppGroupMessages"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,415 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace LINGYUN.Abp.MessageService.Migrations |
||||
|
{ |
||||
|
public partial class ReInitlizeDbMigration : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AlterDatabase() |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppChatGroups", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
AdminUserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
GroupId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
Name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Tag = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Address = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Notice = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
MaxUserCount = table.Column<int>(type: "int", nullable: false), |
||||
|
AllowAnonymous = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
AllowSendMessage = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
Description = table.Column<string>(type: "varchar(128)", maxLength: 128, 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") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppChatGroups", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppGroupChatBlacks", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
GroupId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
ShieldUserId = table.Column<Guid>(type: "char(36)", nullable: false, 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_AppGroupChatBlacks", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppGroupMessages", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
GroupId = table.Column<long>(type: "bigint", 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"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
MessageId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
SendUserName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Content = table.Column<string>(type: "longtext", maxLength: 1048576, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Type = table.Column<int>(type: "int", nullable: false), |
||||
|
SendState = table.Column<sbyte>(type: "tinyint", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppGroupMessages", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppNotifications", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
Severity = table.Column<sbyte>(type: "tinyint", nullable: false), |
||||
|
Type = table.Column<int>(type: "int", nullable: false), |
||||
|
NotificationId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
NotificationName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
NotificationData = table.Column<string>(type: "longtext", maxLength: 1048576, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
NotificationTypeName = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
ExpirationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppNotifications", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserChatCards", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
UserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Sex = table.Column<int>(type: "int", nullable: false), |
||||
|
Sign = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
NickName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Description = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
AvatarUrl = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Birthday = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
||||
|
Age = 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"), |
||||
|
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") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppUserChatCards", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserChatFriends", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
FrientId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
Black = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
DontDisturb = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
SpecialFocus = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
RemarkName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Description = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Status = table.Column<byte>(type: "tinyint unsigned", 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"), |
||||
|
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_AppUserChatFriends", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserChatGroups", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
GroupId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
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_AppUserChatGroups", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserChatSettings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
AllowAnonymous = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
AllowAddFriend = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
RequireAddFriendValition = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
AllowReceiveMessage = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
AllowSendMessage = table.Column<bool>(type: "tinyint(1)", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppUserChatSettings", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserGroupCards", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
NickName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
IsAdmin = table.Column<bool>(type: "tinyint(1)", nullable: false), |
||||
|
SilenceEnd = table.Column<DateTime>(type: "datetime(6)", 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"), |
||||
|
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") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppUserGroupCards", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserMessages", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
ReceiveUserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
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"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
MessageId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
SendUserName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Content = table.Column<string>(type: "longtext", maxLength: 1048576, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
Type = table.Column<int>(type: "int", nullable: false), |
||||
|
SendState = table.Column<sbyte>(type: "tinyint", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppUserMessages", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserNotifications", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
NotificationId = table.Column<long>(type: "bigint", nullable: false), |
||||
|
ReadStatus = table.Column<int>(type: "int", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppUserNotifications", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AppUserSubscribes", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<long>(type: "bigint", nullable: false) |
||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
|
UserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
||||
|
UserName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false, defaultValue: "/") |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"), |
||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
||||
|
NotificationName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AppUserSubscribes", x => x.Id); |
||||
|
}) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppChatGroups_TenantId_Name", |
||||
|
table: "AppChatGroups", |
||||
|
columns: new[] { "TenantId", "Name" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppGroupChatBlacks_TenantId_GroupId", |
||||
|
table: "AppGroupChatBlacks", |
||||
|
columns: new[] { "TenantId", "GroupId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppGroupMessages_TenantId_GroupId", |
||||
|
table: "AppGroupMessages", |
||||
|
columns: new[] { "TenantId", "GroupId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppNotifications_TenantId_NotificationName", |
||||
|
table: "AppNotifications", |
||||
|
columns: new[] { "TenantId", "NotificationName" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppUserChatCards_TenantId_UserId", |
||||
|
table: "AppUserChatCards", |
||||
|
columns: new[] { "TenantId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppUserChatFriends_TenantId_UserId_FrientId", |
||||
|
table: "AppUserChatFriends", |
||||
|
columns: new[] { "TenantId", "UserId", "FrientId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppUserChatGroups_TenantId_GroupId_UserId", |
||||
|
table: "AppUserChatGroups", |
||||
|
columns: new[] { "TenantId", "GroupId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppUserChatSettings_TenantId_UserId", |
||||
|
table: "AppUserChatSettings", |
||||
|
columns: new[] { "TenantId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppUserGroupCards_TenantId_UserId", |
||||
|
table: "AppUserGroupCards", |
||||
|
columns: new[] { "TenantId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AppUserMessages_TenantId_ReceiveUserId", |
||||
|
table: "AppUserMessages", |
||||
|
columns: new[] { "TenantId", "ReceiveUserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Tenant_User_Notification_Id", |
||||
|
table: "AppUserNotifications", |
||||
|
columns: new[] { "TenantId", "UserId", "NotificationId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Tenant_User_Notification_Name", |
||||
|
table: "AppUserSubscribes", |
||||
|
columns: new[] { "TenantId", "UserId", "NotificationName" }, |
||||
|
unique: true); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppChatGroups"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppGroupChatBlacks"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppGroupMessages"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppNotifications"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserChatCards"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserChatFriends"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserChatGroups"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserChatSettings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserGroupCards"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserMessages"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserNotifications"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AppUserSubscribes"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,397 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Platform.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
|
||||
[Migration("20200723133732_Add-Platform-Module")] |
|
||||
partial class AddPlatformModule |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.5") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.RoleRoute", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RoleName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("RoleName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid>("RouteId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleName", "RouteId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoleRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AlwaysShow") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Code") |
|
||||
.HasColumnType("varchar(95) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(95); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("FullName") |
|
||||
.HasColumnName("FullName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("Icon") |
|
||||
.HasColumnName("Icon") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<bool>("IsMenu") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsPublic") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsSideBar") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsToolBar") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("LinkUrl") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("LinkUrl") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Code"); |
|
||||
|
|
||||
b.HasIndex("ParentId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.UserRoute", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("RouteId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId", "RouteId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformUserRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Level") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Title") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Title") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersion"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid>("AppVersionId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("DownloadCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("FileType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("SHA256") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SHA256") |
|
||||
.HasColumnType("varchar(32) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(32); |
|
||||
|
|
||||
b.Property<long>("Size") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AppVersionId"); |
|
||||
|
|
||||
b.HasIndex("Name", "Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersionFile"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Routes.Route", null) |
|
||||
.WithMany() |
|
||||
.HasForeignKey("ParentId"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
|
||||
.WithMany("Files") |
|
||||
.HasForeignKey("AppVersionId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,206 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
public partial class AddPlatformModule : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformRoleRoute", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<int>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
RoleName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
RouteId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformRoleRoute", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformRoute", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Code = table.Column<string>(maxLength: 95, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
FullName = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
DisplayName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
PlatformType = table.Column<int>(nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 255, nullable: true), |
|
||||
Icon = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
LinkUrl = table.Column<string>(maxLength: 255, nullable: false), |
|
||||
IsMenu = table.Column<bool>(nullable: false), |
|
||||
IsToolBar = table.Column<bool>(nullable: false), |
|
||||
IsSideBar = table.Column<bool>(nullable: false), |
|
||||
IsPublic = table.Column<bool>(nullable: false), |
|
||||
IsStatic = table.Column<bool>(nullable: false), |
|
||||
AlwaysShow = table.Column<bool>(nullable: false), |
|
||||
ParentId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformRoute", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AppPlatformRoute_AppPlatformRoute_ParentId", |
|
||||
column: x => x.ParentId, |
|
||||
principalTable: "AppPlatformRoute", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Restrict); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformUserRoute", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<int>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
RouteId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformUserRoute", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformVersion", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Title = table.Column<string>(maxLength: 50, nullable: false), |
|
||||
Version = table.Column<string>(maxLength: 20, nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 2048, nullable: true), |
|
||||
Level = table.Column<int>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformVersion", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformVersionFile", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<int>(nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 255, nullable: false), |
|
||||
Version = table.Column<string>(maxLength: 20, nullable: false), |
|
||||
Size = table.Column<long>(nullable: false), |
|
||||
FileType = table.Column<int>(nullable: false), |
|
||||
SHA256 = table.Column<string>(maxLength: 32, nullable: false), |
|
||||
DownloadCount = table.Column<int>(nullable: false), |
|
||||
AppVersionId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformVersionFile", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AppPlatformVersionFile_AppPlatformVersion_AppVersionId", |
|
||||
column: x => x.AppVersionId, |
|
||||
principalTable: "AppPlatformVersion", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoleRoute_RoleName_RouteId", |
|
||||
table: "AppPlatformRoleRoute", |
|
||||
columns: new[] { "RoleName", "RouteId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoute_Code", |
|
||||
table: "AppPlatformRoute", |
|
||||
column: "Code"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoute_ParentId", |
|
||||
table: "AppPlatformRoute", |
|
||||
column: "ParentId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformUserRoute_UserId_RouteId", |
|
||||
table: "AppPlatformUserRoute", |
|
||||
columns: new[] { "UserId", "RouteId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformVersion_Version", |
|
||||
table: "AppPlatformVersion", |
|
||||
column: "Version"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformVersionFile_AppVersionId", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
column: "AppVersionId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformVersionFile_Name_Version", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
columns: new[] { "Name", "Version" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformRoleRoute"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformRoute"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformUserRoute"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformVersionFile"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformVersion"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,397 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Platform.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
|
||||
[Migration("20200723143103_Modify-Version-File-SHA256-Length")] |
|
||||
partial class ModifyVersionFileSHA256Length |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.5") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.RoleRoute", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RoleName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("RoleName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid>("RouteId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleName", "RouteId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoleRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AlwaysShow") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Code") |
|
||||
.HasColumnType("varchar(95) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(95); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("FullName") |
|
||||
.HasColumnName("FullName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("Icon") |
|
||||
.HasColumnName("Icon") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<bool>("IsMenu") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsPublic") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsSideBar") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsToolBar") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("LinkUrl") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("LinkUrl") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Code"); |
|
||||
|
|
||||
b.HasIndex("ParentId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.UserRoute", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("RouteId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId", "RouteId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformUserRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Level") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Title") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Title") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersion"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid>("AppVersionId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("DownloadCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("FileType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("SHA256") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SHA256") |
|
||||
.HasColumnType("varchar(65) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(65); |
|
||||
|
|
||||
b.Property<long>("Size") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AppVersionId"); |
|
||||
|
|
||||
b.HasIndex("Name", "Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersionFile"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Routes.Route", null) |
|
||||
.WithMany() |
|
||||
.HasForeignKey("ParentId"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
|
||||
.WithMany("Files") |
|
||||
.HasForeignKey("AppVersionId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,31 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
public partial class ModifyVersionFileSHA256Length : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "SHA256", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
maxLength: 65, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "varchar(32) CHARACTER SET utf8mb4", |
|
||||
oldMaxLength: 32); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "SHA256", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
type: "varchar(32) CHARACTER SET utf8mb4", |
|
||||
maxLength: 32, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 65); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,406 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Platform.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
|
||||
[Migration("20200724092022_Add-Version-File-Field-Path-And-Platform-Type")] |
|
||||
partial class AddVersionFileFieldPathAndPlatformType |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.5") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.RoleRoute", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RoleName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("RoleName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid>("RouteId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleName", "RouteId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoleRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AlwaysShow") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Code") |
|
||||
.HasColumnType("varchar(95) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(95); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("FullName") |
|
||||
.HasColumnName("FullName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("Icon") |
|
||||
.HasColumnName("Icon") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<bool>("IsMenu") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsPublic") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsSideBar") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<bool>("IsToolBar") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("LinkUrl") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("LinkUrl") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Code"); |
|
||||
|
|
||||
b.HasIndex("ParentId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.UserRoute", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("RouteId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId", "RouteId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformUserRoute"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Level") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Title") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Title") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersion"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid>("AppVersionId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("DownloadCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("FileType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("SHA256") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SHA256") |
|
||||
.HasColumnType("varchar(65) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(65); |
|
||||
|
|
||||
b.Property<long>("Size") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AppVersionId"); |
|
||||
|
|
||||
b.HasIndex("Path", "Name", "Version") |
|
||||
.IsUnique(); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersionFile"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Routes.Route", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Routes.Route", null) |
|
||||
.WithMany() |
|
||||
.HasForeignKey("ParentId"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
|
||||
.WithMany("Files") |
|
||||
.HasForeignKey("AppVersionId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,52 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
public partial class AddVersionFileFieldPathAndPlatformType : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_AppPlatformVersionFile_Name_Version", |
|
||||
table: "AppPlatformVersionFile"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Path", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
maxLength: 255, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "PlatformType", |
|
||||
table: "AppPlatformVersion", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformVersionFile_Path_Name_Version", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
columns: new[] { "Path", "Name", "Version" }, |
|
||||
unique: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_AppPlatformVersionFile_Path_Name_Version", |
|
||||
table: "AppPlatformVersionFile"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Path", |
|
||||
table: "AppPlatformVersionFile"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "PlatformType", |
|
||||
table: "AppPlatformVersion"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformVersionFile_Name_Version", |
|
||||
table: "AppPlatformVersionFile", |
|
||||
columns: new[] { "Name", "Version" }); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,637 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Platform.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
|
||||
[Migration("20201203105205_Add-Menu-Layout-Data-And-More-Entity")] |
|
||||
partial class AddMenuLayoutDataAndMoreEntity |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.8") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Code") |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AppPlatformDatas"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("DataId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Value") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<int>("ValueType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("DataId"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AppPlatformDataItems"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("DataId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Redirect") |
|
||||
.HasColumnName("Redirect") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.ToTable("AppPlatformLayouts"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("Component") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Redirect") |
|
||||
.HasColumnName("Redirect") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("ParentId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("MenuId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RoleName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("RoleName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleName", "MenuId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoleMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("MenuId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId", "MenuId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformUserMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Level") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Title") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Title") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersion"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid>("AppVersionId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("DownloadCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("FileType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("SHA256") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SHA256") |
|
||||
.HasColumnType("varchar(65) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(65); |
|
||||
|
|
||||
b.Property<long>("Size") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AppVersionId"); |
|
||||
|
|
||||
b.HasIndex("Path", "Name", "Version") |
|
||||
.IsUnique(); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersionFile"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Datas.Data", null) |
|
||||
.WithMany("Items") |
|
||||
.HasForeignKey("DataId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Menus.Menu", null) |
|
||||
.WithMany("Children") |
|
||||
.HasForeignKey("ParentId"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
|
||||
.WithMany("Files") |
|
||||
.HasForeignKey("AppVersionId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,338 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
public partial class AddMenuLayoutDataAndMoreEntity : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformRoleRoute"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformRoute"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformUserRoute"); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformDatas", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 30, nullable: false), |
|
||||
Code = table.Column<string>(maxLength: 1024, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
ParentId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformDatas", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformLayouts", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Path = table.Column<string>(maxLength: 255, nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Description = table.Column<string>(nullable: true), |
|
||||
Redirect = table.Column<string>(maxLength: 255, nullable: true), |
|
||||
Code = table.Column<string>(nullable: true), |
|
||||
PlatformType = table.Column<int>(nullable: false), |
|
||||
DataId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformLayouts", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformMenus", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Path = table.Column<string>(maxLength: 255, nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Description = table.Column<string>(nullable: true), |
|
||||
Redirect = table.Column<string>(maxLength: 255, nullable: true), |
|
||||
PlatformType = table.Column<int>(nullable: false), |
|
||||
Code = table.Column<string>(nullable: true), |
|
||||
Component = table.Column<string>(nullable: true), |
|
||||
ParentId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformMenus", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AppPlatformMenus_AppPlatformMenus_ParentId", |
|
||||
column: x => x.ParentId, |
|
||||
principalTable: "AppPlatformMenus", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Restrict); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformRoleMenus", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
MenuId = table.Column<Guid>(nullable: false), |
|
||||
RoleName = table.Column<string>(maxLength: 256, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformRoleMenus", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformUserMenus", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
MenuId = table.Column<Guid>(nullable: false), |
|
||||
UserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformUserMenus", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformDataItems", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 30, nullable: false), |
|
||||
DisplayName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Description = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
ValueType = table.Column<int>(nullable: false), |
|
||||
DataId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformDataItems", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AppPlatformDataItems_AppPlatformDatas_DataId", |
|
||||
column: x => x.DataId, |
|
||||
principalTable: "AppPlatformDatas", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformDataItems_DataId", |
|
||||
table: "AppPlatformDataItems", |
|
||||
column: "DataId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformDataItems_Name", |
|
||||
table: "AppPlatformDataItems", |
|
||||
column: "Name"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformDatas_Name", |
|
||||
table: "AppPlatformDatas", |
|
||||
column: "Name"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformMenus_ParentId", |
|
||||
table: "AppPlatformMenus", |
|
||||
column: "ParentId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoleMenus_RoleName_MenuId", |
|
||||
table: "AppPlatformRoleMenus", |
|
||||
columns: new[] { "RoleName", "MenuId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformUserMenus_UserId_MenuId", |
|
||||
table: "AppPlatformUserMenus", |
|
||||
columns: new[] { "UserId", "MenuId" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformDataItems"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformLayouts"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformMenus"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformRoleMenus"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformUserMenus"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AppPlatformDatas"); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformRoleRoute", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<int>(type: "int", nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|
||||
CreatorId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
DeleterId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
LastModifierId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
RoleName = table.Column<string>(type: "varchar(256) CHARACTER SET utf8mb4", maxLength: 256, nullable: false), |
|
||||
RouteId = table.Column<string>(type: "char(36)", nullable: false), |
|
||||
TenantId = table.Column<string>(type: "char(36)", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformRoleRoute", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformRoute", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<string>(type: "char(36)", nullable: false), |
|
||||
AlwaysShow = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
Code = table.Column<string>(type: "varchar(95) CHARACTER SET utf8mb4", maxLength: 95, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "varchar(40) CHARACTER SET utf8mb4", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|
||||
CreatorId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
DeleterId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
Description = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true), |
|
||||
DisplayName = table.Column<string>(type: "varchar(128) CHARACTER SET utf8mb4", maxLength: 128, nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true), |
|
||||
FullName = table.Column<string>(type: "varchar(128) CHARACTER SET utf8mb4", maxLength: 128, nullable: true), |
|
||||
Icon = table.Column<string>(type: "varchar(128) CHARACTER SET utf8mb4", maxLength: 128, nullable: true), |
|
||||
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
|
||||
IsMenu = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
IsPublic = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
IsSideBar = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
IsStatic = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
IsToolBar = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
LastModifierId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
LinkUrl = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false), |
|
||||
Name = table.Column<string>(type: "varchar(64) CHARACTER SET utf8mb4", maxLength: 64, nullable: false), |
|
||||
ParentId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
PlatformType = table.Column<int>(type: "int", nullable: false), |
|
||||
TenantId = table.Column<string>(type: "char(36)", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformRoute", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AppPlatformRoute_AppPlatformRoute_ParentId", |
|
||||
column: x => x.ParentId, |
|
||||
principalTable: "AppPlatformRoute", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Restrict); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AppPlatformUserRoute", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<int>(type: "int", nullable: false) |
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
|
||||
CreatorId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
DeleterId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
|
||||
LastModifierId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
RouteId = table.Column<string>(type: "char(36)", nullable: false), |
|
||||
TenantId = table.Column<string>(type: "char(36)", nullable: true), |
|
||||
UserId = table.Column<string>(type: "char(36)", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AppPlatformUserRoute", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoleRoute_RoleName_RouteId", |
|
||||
table: "AppPlatformRoleRoute", |
|
||||
columns: new[] { "RoleName", "RouteId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoute_Code", |
|
||||
table: "AppPlatformRoute", |
|
||||
column: "Code"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformRoute_ParentId", |
|
||||
table: "AppPlatformRoute", |
|
||||
column: "ParentId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AppPlatformUserRoute_UserId_RouteId", |
|
||||
table: "AppPlatformUserRoute", |
|
||||
columns: new[] { "UserId", "RouteId" }); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,643 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Platform.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
|
||||
[Migration("20201204082313_Add-Data-Item-AllowBeNull-Field")] |
|
||||
partial class AddDataItemAllowBeNullField |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.8") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Code") |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AppPlatformDatas"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AllowBeNull") |
|
||||
.HasColumnType("tinyint(1)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("DataId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Value") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<int>("ValueType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("DataId"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AppPlatformDataItems"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("DataId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Redirect") |
|
||||
.HasColumnName("Redirect") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.ToTable("AppPlatformLayouts"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("Component") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Component") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Redirect") |
|
||||
.HasColumnName("Redirect") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("ParentId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("MenuId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RoleName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("RoleName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleName", "MenuId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoleMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("MenuId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId", "MenuId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformUserMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Level") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Title") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Title") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersion"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid>("AppVersionId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("DownloadCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("FileType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("SHA256") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SHA256") |
|
||||
.HasColumnType("varchar(65) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(65); |
|
||||
|
|
||||
b.Property<long>("Size") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AppVersionId"); |
|
||||
|
|
||||
b.HasIndex("Path", "Name", "Version") |
|
||||
.IsUnique(); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersionFile"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Datas.Data", null) |
|
||||
.WithMany("Items") |
|
||||
.HasForeignKey("DataId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Menus.Menu", null) |
|
||||
.WithMany("Children") |
|
||||
.HasForeignKey("ParentId"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
|
||||
.WithMany("Files") |
|
||||
.HasForeignKey("AppVersionId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,40 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
public partial class AddDataItemAllowBeNullField : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Component", |
|
||||
table: "AppPlatformMenus", |
|
||||
maxLength: 255, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "longtext CHARACTER SET utf8mb4", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "AllowBeNull", |
|
||||
table: "AppPlatformDataItems", |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AllowBeNull", |
|
||||
table: "AppPlatformDataItems"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Component", |
|
||||
table: "AppPlatformMenus", |
|
||||
type: "longtext CHARACTER SET utf8mb4", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldMaxLength: 255); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,645 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using LINGYUN.Platform.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
|
|
||||
namespace LINGYUN.Platform.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
|
||||
[Migration("20201204083250_Data-Description-Field-Allow-Be-Long")] |
|
||||
partial class DataDescriptionFieldAllowBeLong |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|
||||
.HasAnnotation("ProductVersion", "3.1.8") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Code") |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AppPlatformDatas"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<bool>("AllowBeNull") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(true); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("DataId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(30); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Value") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<int>("ValueType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("DataId"); |
|
||||
|
|
||||
b.HasIndex("Name"); |
|
||||
|
|
||||
b.ToTable("AppPlatformDataItems"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("DataId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Redirect") |
|
||||
.HasColumnName("Redirect") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.ToTable("AppPlatformLayouts"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Code") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("Component") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Component") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<string>("DisplayName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("DisplayName") |
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("ParentId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<string>("Redirect") |
|
||||
.HasColumnName("Redirect") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("ParentId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("MenuId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("RoleName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("RoleName") |
|
||||
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleName", "MenuId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformRoleMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("MenuId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid>("UserId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId", "MenuId"); |
|
||||
|
|
||||
b.ToTable("AppPlatformUserMenus"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(40); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasColumnName("Description") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties") |
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasColumnType("tinyint(1)") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("Level") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("PlatformType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Title") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Title") |
|
||||
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(50); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Version"); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersion"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.Property<int>("Id") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<Guid>("AppVersionId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<int>("DownloadCount") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<int>("FileType") |
|
||||
.HasColumnType("int"); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime") |
|
||||
.HasColumnType("datetime(6)"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Name") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("Path") |
|
||||
.HasColumnName("Path") |
|
||||
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(255); |
|
||||
|
|
||||
b.Property<string>("SHA256") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SHA256") |
|
||||
.HasColumnType("varchar(65) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(65); |
|
||||
|
|
||||
b.Property<long>("Size") |
|
||||
.HasColumnType("bigint"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId") |
|
||||
.HasColumnType("char(36)"); |
|
||||
|
|
||||
b.Property<string>("Version") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("Version") |
|
||||
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
|
||||
.HasMaxLength(20); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("AppVersionId"); |
|
||||
|
|
||||
b.HasIndex("Path", "Name", "Version") |
|
||||
.IsUnique(); |
|
||||
|
|
||||
b.ToTable("AppPlatformVersionFile"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Datas.Data", null) |
|
||||
.WithMany("Items") |
|
||||
.HasForeignKey("DataId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Menus.Menu", null) |
|
||||
.WithMany("Children") |
|
||||
.HasForeignKey("ParentId"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
|
||||
{ |
|
||||
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
|
||||
.WithMany("Files") |
|
||||
.HasForeignKey("AppVersionId") |
|
||||
.OnDelete(DeleteBehavior.Cascade) |
|
||||
.IsRequired(); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue