diff --git a/EventHub.sln b/EventHub.sln index cae575c..9851ae4 100644 --- a/EventHub.sln +++ b/EventHub.sln @@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-7 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application.Tests", "test\EventHub.Application.Tests\EventHub.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore.DbMigrations", "src\EventHub.EntityFrameworkCore.DbMigrations\EventHub.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain.Shared", "src\EventHub.Domain.Shared\EventHub.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application.Contracts", "src\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}" @@ -89,10 +87,6 @@ Global {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.Build.0 = Release|Any CPU {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -182,7 +176,6 @@ Global {554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {81F0EB50-4CF9-402D-B723-A07E95F8D7CB} {42F719ED-8413-4895-B5B4-5AB56079BC66} = {81F0EB50-4CF9-402D-B723-A07E95F8D7CB} {C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {81F0EB50-4CF9-402D-B723-A07E95F8D7CB} - {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {81F0EB50-4CF9-402D-B723-A07E95F8D7CB} {BAA6ED88-6783-48EF-8691-46F4BED14023} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {073C361E-B8F4-49F5-93CC-72A3FF49C026} = {BAA6ED88-6783-48EF-8691-46F4BED14023} {F8CF0FE2-9F75-4940-92EC-3D021416DEBF} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} diff --git a/src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj b/src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj index 0c57449..6fec7fc 100644 --- a/src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj +++ b/src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj @@ -25,7 +25,7 @@ - + diff --git a/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs b/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs index ac40909..38ff481 100644 --- a/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs +++ b/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs @@ -32,7 +32,7 @@ namespace EventHub.Admin [DependsOn( typeof(EventHubAdminApplicationModule), typeof(EventHubAdminHttpApiModule), - typeof(EventHubEntityFrameworkCoreDbMigrationsModule), + typeof(EventHubEntityFrameworkCoreModule), typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreSerilogModule), diff --git a/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs b/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs index 135561c..64e9dc5 100644 --- a/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs +++ b/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs @@ -7,6 +7,7 @@ using EventHub.Organizations; using EventHub.Organizations.Memberships; using EventHub.Users; using Volo.Abp.AutoMapper; +using Volo.Abp.Identity; namespace EventHub { @@ -17,7 +18,7 @@ namespace EventHub CreateMap(); CreateMap(); - CreateMap(); + CreateMap(); CreateMap(); CreateMap() @@ -29,14 +30,14 @@ namespace EventHub .Ignore(x => x.OrganizationName) .Ignore(x => x.OrganizationDisplayName); - CreateMap(); + CreateMap(); CreateMap() .Ignore(x => x.Country); CreateMap(); - CreateMap(); + CreateMap(); } } } diff --git a/src/EventHub.Application/Events/EventAppService.cs b/src/EventHub.Application/Events/EventAppService.cs index f6f9bcf..2bf29cb 100644 --- a/src/EventHub.Application/Events/EventAppService.cs +++ b/src/EventHub.Application/Events/EventAppService.cs @@ -11,6 +11,7 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Authorization; using Volo.Abp.BlobStoring; using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; using Volo.Abp.Users; namespace EventHub.Events @@ -22,7 +23,7 @@ namespace EventHub.Events private readonly IRepository _eventRegistrationRepository; private readonly IRepository _eventRepository; private readonly IRepository _organizationRepository; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private readonly IRepository _countriesRepository; private readonly IBlobContainer _eventBlobContainer; @@ -32,7 +33,7 @@ namespace EventHub.Events IRepository eventRegistrationRepository, IRepository eventRepository, IRepository organizationRepository, - IRepository userRepository, + IRepository userRepository, IRepository countriesRepository, IBlobContainer eventBlobContainer) { diff --git a/src/EventHub.Application/Events/Registrations/EventRegistrationAppService.cs b/src/EventHub.Application/Events/Registrations/EventRegistrationAppService.cs index 367abea..1197a5a 100644 --- a/src/EventHub.Application/Events/Registrations/EventRegistrationAppService.cs +++ b/src/EventHub.Application/Events/Registrations/EventRegistrationAppService.cs @@ -2,25 +2,25 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using EventHub.Users; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Repositories; using Volo.Abp.Users; +using Volo.Abp.Identity; namespace EventHub.Events.Registrations { public class EventRegistrationAppService : EventHubAppService, IEventRegistrationAppService { private readonly EventRegistrationManager _eventRegistrationManager; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private readonly IRepository _eventRepository; private readonly IRepository _eventRegistrationRepository; private readonly EventRegistrationNotifier _eventRegistrationNotifier; public EventRegistrationAppService( EventRegistrationManager eventRegistrationManager, - IRepository userRepository, + IRepository userRepository, IRepository eventRepository, IRepository eventRegistrationRepository, EventRegistrationNotifier eventRegistrationNotifier) @@ -77,7 +77,7 @@ namespace EventHub.Events.Registrations return new PagedResultDto( totalCount, - ObjectMapper.Map, List>(users) + ObjectMapper.Map, List>(users) ); } diff --git a/src/EventHub.Application/Events/Registrations/EventRegistrationNotifier.cs b/src/EventHub.Application/Events/Registrations/EventRegistrationNotifier.cs index 7413e96..baeca74 100644 --- a/src/EventHub.Application/Events/Registrations/EventRegistrationNotifier.cs +++ b/src/EventHub.Application/Events/Registrations/EventRegistrationNotifier.cs @@ -1,8 +1,8 @@ using System.Threading.Tasks; using EventHub.Emailing; -using EventHub.Users; using Volo.Abp.DependencyInjection; using Volo.Abp.Emailing; +using Volo.Abp.Identity; using Volo.Abp.TextTemplating; namespace EventHub.Events.Registrations @@ -22,7 +22,7 @@ namespace EventHub.Events.Registrations public async Task NotifyAsync( Event @event, - AppUser user) + IdentityUser user) { if (user is null || @event is null) { diff --git a/src/EventHub.Application/Organizations/Memberships/OrganizationMembershipAppService.cs b/src/EventHub.Application/Organizations/Memberships/OrganizationMembershipAppService.cs index a3d70dc..744d74d 100644 --- a/src/EventHub.Application/Organizations/Memberships/OrganizationMembershipAppService.cs +++ b/src/EventHub.Application/Organizations/Memberships/OrganizationMembershipAppService.cs @@ -6,6 +6,7 @@ using EventHub.Users; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; using Volo.Abp.Users; namespace EventHub.Organizations.Memberships @@ -13,13 +14,13 @@ namespace EventHub.Organizations.Memberships public class OrganizationMembershipAppService : EventHubAppService, IOrganizationMembershipAppService { private readonly OrganizationMembershipManager _organizationMembershipManager; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private readonly IRepository _organizationRepository; private readonly IRepository _organizationMembershipsRepository; public OrganizationMembershipAppService( OrganizationMembershipManager organizationMembershipManager, - IRepository userRepository, + IRepository userRepository, IRepository organizationRepository, IRepository organizationMembershipsRepository) { @@ -72,7 +73,7 @@ namespace EventHub.Organizations.Memberships return new PagedResultDto( totalCount, - ObjectMapper.Map, List>(users) + ObjectMapper.Map, List>(users) ); } } diff --git a/src/EventHub.Application/Organizations/OrganizationAppService.cs b/src/EventHub.Application/Organizations/OrganizationAppService.cs index ff4a958..a53573f 100644 --- a/src/EventHub.Application/Organizations/OrganizationAppService.cs +++ b/src/EventHub.Application/Organizations/OrganizationAppService.cs @@ -9,6 +9,7 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Authorization; using Volo.Abp.BlobStoring; using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; using Volo.Abp.Users; namespace EventHub.Organizations @@ -19,14 +20,14 @@ namespace EventHub.Organizations private readonly IRepository _organizationMembershipsRepository; private readonly OrganizationManager _organizationManager; private readonly IBlobContainer _organizationBlobContainer; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; public OrganizationAppService( IRepository organizationRepository, IRepository organizationMembershipsRepository, OrganizationManager organizationManager, IBlobContainer organizationBlobContainer, - IRepository userRepository) + IRepository userRepository) { _organizationRepository = organizationRepository; _organizationMembershipsRepository = organizationMembershipsRepository; diff --git a/src/EventHub.Application/Users/UserAppService.cs b/src/EventHub.Application/Users/UserAppService.cs index b2aee9d..2481f18 100644 --- a/src/EventHub.Application/Users/UserAppService.cs +++ b/src/EventHub.Application/Users/UserAppService.cs @@ -2,14 +2,15 @@ using System; using System.Threading.Tasks; using EventHub.Members; using Volo.Abp.Domain.Repositories; +using Volo.Abp.Identity; namespace EventHub.Users { public class UserAppService : EventHubAppService, IUserAppService { - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; - public UserAppService(IRepository userRepository) + public UserAppService(IRepository userRepository) { _userRepository = userRepository; } @@ -18,7 +19,7 @@ namespace EventHub.Users { var user = await _userRepository.FindAsync(x => x.UserName == username); - return ObjectMapper.Map(user); + return ObjectMapper.Map(user); } } } \ No newline at end of file diff --git a/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs b/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs index e34e048..7ef1995 100644 --- a/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs +++ b/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs @@ -7,6 +7,7 @@ using EventHub.Users; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Repositories; using Volo.Abp.Emailing; +using Volo.Abp.Identity; using Volo.Abp.Linq; using Volo.Abp.TextTemplating; @@ -16,14 +17,14 @@ namespace EventHub.Events { private readonly IEmailSender _emailSender; private readonly ITemplateRenderer _templateRenderer; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private readonly IRepository _eventRegistrationRepository; private readonly IAsyncQueryableExecuter _asyncExecuter; public EventReminderNotifier( IEmailSender emailSender, ITemplateRenderer templateRenderer, - IRepository userRepository, + IRepository userRepository, IRepository eventRegistrationRepository, IAsyncQueryableExecuter asyncExecuter) { diff --git a/src/EventHub.BackgroundServices/Events/EventTimingChangeNotifier.cs b/src/EventHub.BackgroundServices/Events/EventTimingChangeNotifier.cs index c097c5c..e60b9f0 100644 --- a/src/EventHub.BackgroundServices/Events/EventTimingChangeNotifier.cs +++ b/src/EventHub.BackgroundServices/Events/EventTimingChangeNotifier.cs @@ -7,6 +7,7 @@ using EventHub.Users; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Repositories; using Volo.Abp.Emailing; +using Volo.Abp.Identity; using Volo.Abp.Linq; using Volo.Abp.TextTemplating; @@ -17,14 +18,14 @@ namespace EventHub.Events private readonly IEmailSender _emailSender; private readonly ITemplateRenderer _templateRenderer; private readonly IAsyncQueryableExecuter _asyncExecuter; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private readonly IRepository _eventRegistrationRepository; public EventTimingChangeNotifier( IEmailSender emailSender, ITemplateRenderer templateRenderer, IAsyncQueryableExecuter asyncExecuter, - IRepository userRepository, + IRepository userRepository, IRepository eventRegistrationRepository) { _emailSender = emailSender; diff --git a/src/EventHub.BackgroundServices/Events/NewEventNotifier.cs b/src/EventHub.BackgroundServices/Events/NewEventNotifier.cs index 8939071..64dcf02 100644 --- a/src/EventHub.BackgroundServices/Events/NewEventNotifier.cs +++ b/src/EventHub.BackgroundServices/Events/NewEventNotifier.cs @@ -7,6 +7,7 @@ using EventHub.Users; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Repositories; using Volo.Abp.Emailing; +using Volo.Abp.Identity; using Volo.Abp.Linq; using Volo.Abp.TextTemplating; @@ -17,14 +18,14 @@ namespace EventHub.Events private readonly IEmailSender _emailSender; private readonly ITemplateRenderer _templateRenderer; private readonly IRepository _organizationMembershipsRepository; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private readonly IAsyncQueryableExecuter _asyncExecuter; public NewEventNotifier( IEmailSender emailSender, ITemplateRenderer templateRenderer, IRepository organizationMembershipsRepository, - IRepository userRepository, + IRepository userRepository, IAsyncQueryableExecuter asyncExecuter) { _emailSender = emailSender; diff --git a/src/EventHub.DbMigrator/Data/EventHubSampleDataSeedContributor.cs b/src/EventHub.DbMigrator/Data/EventHubSampleDataSeedContributor.cs index 0f118b2..d33e59a 100644 --- a/src/EventHub.DbMigrator/Data/EventHubSampleDataSeedContributor.cs +++ b/src/EventHub.DbMigrator/Data/EventHubSampleDataSeedContributor.cs @@ -24,7 +24,7 @@ namespace EventHub.DbMigrator.Data private readonly IRepository _eventRepository; private readonly EventManager _eventManager; private readonly EventRegistrationManager _eventRegistrationManager; - private readonly IRepository _userRepository; + private readonly IRepository _userRepository; private Guid _userSandraId; private Guid _userSergeyId; @@ -46,7 +46,7 @@ namespace EventHub.DbMigrator.Data IRepository eventRepository, EventManager eventManager, EventRegistrationManager eventRegistrationManager, - IRepository userRepository) + IRepository userRepository) { _guidGenerator = guidGenerator; _identityUserManager = identityUserManager; diff --git a/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj b/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj index c3d8cb5..ebffe59 100644 --- a/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj +++ b/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs b/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs index 588aecb..40f47fb 100644 --- a/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs +++ b/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs @@ -8,7 +8,7 @@ namespace EventHub.DbMigrator { [DependsOn( typeof(AbpAutofacModule), - typeof(EventHubEntityFrameworkCoreDbMigrationsModule), + typeof(EventHubEntityFrameworkCoreModule), typeof(EventHubApplicationContractsModule), typeof(EventHubAdminApplicationContractsModule) )] diff --git a/src/EventHub.Domain/Data/EventHubDbMigrationService.cs b/src/EventHub.Domain/Data/EventHubDbMigrationService.cs index d993ac1..b29a92c 100644 --- a/src/EventHub.Domain/Data/EventHubDbMigrationService.cs +++ b/src/EventHub.Domain/Data/EventHubDbMigrationService.cs @@ -121,7 +121,7 @@ namespace EventHub.Data var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src"); return Directory.GetDirectories(srcDirectoryPath) - .FirstOrDefault(d => d.EndsWith(".DbMigrations")); + .FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore")); } private static string GetSolutionDirectoryPath() diff --git a/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs b/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs index 6a097f7..2938903 100644 --- a/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs +++ b/src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs @@ -1,9 +1,9 @@ using System; using System.Threading.Tasks; -using EventHub.Users; using Volo.Abp; using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Services; +using Volo.Abp.Identity; namespace EventHub.Events.Registrations { @@ -18,7 +18,7 @@ namespace EventHub.Events.Registrations public async Task RegisterAsync( Event @event, - AppUser user) + IdentityUser user) { if (IsPastEvent(@event)) { @@ -49,7 +49,7 @@ namespace EventHub.Events.Registrations public async Task UnregisterAsync( Event @event, - AppUser user) + IdentityUser user) { if (IsPastEvent(@event)) { @@ -63,7 +63,7 @@ namespace EventHub.Events.Registrations public async Task IsRegisteredAsync( Event @event, - AppUser user) + IdentityUser user) { return await _eventRegistrationRepository .AnyAsync(x => x.EventId == @event.Id && x.UserId == user.Id); diff --git a/src/EventHub.Domain/Organizations/Memberships/OrganizationMembershipManager.cs b/src/EventHub.Domain/Organizations/Memberships/OrganizationMembershipManager.cs index 4121725..f1bb700 100644 --- a/src/EventHub.Domain/Organizations/Memberships/OrganizationMembershipManager.cs +++ b/src/EventHub.Domain/Organizations/Memberships/OrganizationMembershipManager.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; -using EventHub.Users; using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Services; +using Volo.Abp.Identity; namespace EventHub.Organizations.Memberships { @@ -17,7 +17,7 @@ namespace EventHub.Organizations.Memberships public async Task JoinAsync( Organization organization, - AppUser user) + IdentityUser user) { if (await IsJoinedAsync(organization, user)) { @@ -35,7 +35,7 @@ namespace EventHub.Organizations.Memberships public async Task IsJoinedAsync( Organization organization, - AppUser user) + IdentityUser user) { return await _organizationMembershipsRepository .AnyAsync(x => x.OrganizationId == organization.Id && x.UserId == user.Id); diff --git a/src/EventHub.Domain/Users/AppUser.cs b/src/EventHub.Domain/Users/AppUser.cs deleted file mode 100644 index 8a767e7..0000000 --- a/src/EventHub.Domain/Users/AppUser.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.Users; - -namespace EventHub.Users -{ - /* This entity shares the same table/collection ("AbpUsers" by default) with the - * IdentityUser entity of the Identity module. - * - * - You can define your custom properties into this class. - * - You never create or delete this entity, because it is Identity module's job. - * - You can query users from database with this entity. - * - You can update values of your custom properties. - */ - public class AppUser : FullAuditedAggregateRoot, IUser - { - #region Base properties - - /* These properties are shared with the IdentityUser entity of the Identity module. - * Do not change these properties through this class. Instead, use Identity module - * services (like IdentityUserManager) to change them. - * So, this properties are designed as read only! - */ - - public virtual Guid? TenantId { get; private set; } - - public virtual string UserName { get; private set; } - - public virtual string Name { get; private set; } - - public virtual string Surname { get; private set; } - - public virtual string Email { get; private set; } - - public virtual bool EmailConfirmed { get; private set; } - - public virtual string PhoneNumber { get; private set; } - - public virtual bool PhoneNumberConfirmed { get; private set; } - - #endregion - - /* Add your own properties here. Example: - * - * public string MyProperty { get; set; } - * - * If you add a property and using the EF Core, remember these; - * - * 1. Update EventHubDbContext.OnModelCreating - * to configure the mapping for your new property - * 2. Update EventHubEfCoreEntityExtensionMappings to extend the IdentityUser entity - * and add your new property to the migration. - * 3. Use the Add-Migration to add a new database migration. - * 4. Run the .DbMigrator project (or use the Update-Database command) to apply - * schema change to the database. - */ - - private AppUser() - { - - } - - public string GetFullNameOrUsername() - { - if (!string.IsNullOrWhiteSpace(Name) && !string.IsNullOrWhiteSpace(Surname)) - { - return Name + " " + Surname; - } - - if (!string.IsNullOrWhiteSpace(Name)) - { - return Name; - } - - return UserName; - } - } -} diff --git a/src/EventHub.Domain/Users/EventHubIdentityUserExtensions.cs b/src/EventHub.Domain/Users/EventHubIdentityUserExtensions.cs new file mode 100644 index 0000000..98b3e9b --- /dev/null +++ b/src/EventHub.Domain/Users/EventHubIdentityUserExtensions.cs @@ -0,0 +1,22 @@ +using Volo.Abp.Identity; + +namespace EventHub.Users +{ + public static class EventHubIdentityUserExtensions + { + public static string GetFullNameOrUsername(this IdentityUser user) + { + if (!string.IsNullOrWhiteSpace(user.Name) && !string.IsNullOrWhiteSpace(user.Surname)) + { + return user.Name + " " + user.Surname; + } + + if (!string.IsNullOrWhiteSpace(user.Name)) + { + return user.Name; + } + + return user.UserName; + } + } +} \ No newline at end of file diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs b/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs deleted file mode 100644 index 65d9f49..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Modularity; - -namespace EventHub.EntityFrameworkCore -{ - [DependsOn( - typeof(EventHubEntityFrameworkCoreModule) - )] - public class EventHubEntityFrameworkCoreDbMigrationsModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(); - } - } -} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs b/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs deleted file mode 100644 index 16787c0..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs +++ /dev/null @@ -1,47 +0,0 @@ -using EventHub.Events.Registrations; -using Microsoft.EntityFrameworkCore; -using Volo.Abp.AuditLogging.EntityFrameworkCore; -using Volo.Abp.BackgroundJobs.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity; -using Volo.Abp.Identity.EntityFrameworkCore; -using Volo.Abp.IdentityServer.EntityFrameworkCore; -using Volo.Abp.PermissionManagement.EntityFrameworkCore; -using Volo.Abp.SettingManagement.EntityFrameworkCore; -using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; - -namespace EventHub.EntityFrameworkCore -{ - /* This DbContext is only used for database migrations. - * It is not used on runtime. See EventHubDbContext for the runtime DbContext. - * It is a unified model that includes configuration for - * all used modules and your application. - */ - public class EventHubMigrationsDbContext : AbpDbContext - { - public EventHubMigrationsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - /* Include modules to your migration db context */ - - builder.ConfigurePermissionManagement(); - builder.ConfigureSettingManagement(); - builder.ConfigureBackgroundJobs(); - builder.ConfigureAuditLogging(); - builder.ConfigureIdentity(); - builder.ConfigureIdentityServer(); - - /* Configure your own tables/entities inside the ConfigureEventHub method */ - - builder.ConfigureEventHub(true); - builder.ConfigureBlobStoring(); - } - } -} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj b/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj deleted file mode 100644 index 811c40c..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - net5.0 - EventHub - - - - - - - - - - - diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs b/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs deleted file mode 100644 index 953dfe2..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.Designer.cs +++ /dev/null @@ -1,2636 +0,0 @@ -// -using System; -using EventHub.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Volo.Abp.EntityFrameworkCore; - -namespace EventHub.Migrations -{ - [DbContext(typeof(EventHubMigrationsDbContext))] - [Migration("20210421100913_Initial")] - partial class Initial - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) - .HasAnnotation("Relational:MaxIdentifierLength", 63) - .HasAnnotation("ProductVersion", "5.0.5") - .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); - - modelBuilder.Entity("EventHub.Countries.Country", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("EhCountries"); - }); - - modelBuilder.Entity("EventHub.Events.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Capacity") - .HasColumnType("integer"); - - b.Property("City") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountryId") - .HasColumnType("uuid"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("EndTime") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsEmailSentToMembers") - .HasColumnType("boolean"); - - b.Property("IsOnline") - .HasColumnType("boolean"); - - b.Property("IsRemindingEmailSent") - .HasColumnType("boolean"); - - b.Property("Language") - .HasMaxLength(16) - .HasColumnType("character varying(16)"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("OnlineLink") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("OrganizationId") - .HasColumnType("uuid"); - - b.Property("StartTime") - .HasColumnType("timestamp without time zone"); - - b.Property("TimingChangeCount") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(69) - .HasColumnType("character varying(69)"); - - b.Property("UrlCode") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("character varying(8)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.HasIndex("IsEmailSentToMembers"); - - b.HasIndex("StartTime"); - - b.HasIndex("UrlCode"); - - b.HasIndex("IsRemindingEmailSent", "StartTime"); - - b.HasIndex("OrganizationId", "StartTime"); - - b.ToTable("EhEvents"); - }); - - modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("EventId") - .HasColumnType("uuid"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsTimingChangeEmailSent") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("IsTimingChangeEmailSent"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("EventId", "UserId"); - - b.ToTable("EhEventRegistrations"); - }); - - modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("OrganizationId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("OrganizationId", "UserId"); - - b.ToTable("EhOrganizationMemberships"); - }); - - modelBuilder.Entity("EventHub.Organizations.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("FacebookUsername") - .HasColumnType("text"); - - b.Property("GitHubUsername") - .HasColumnType("text"); - - b.Property("InstagramUsername") - .HasColumnType("text"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("MediumUsername") - .HasColumnType("text"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("TwitterUsername") - .HasColumnType("text"); - - b.Property("Website") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.HasIndex("Name"); - - b.HasIndex("OwnerUserId"); - - b.ToTable("EhOrganizations"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("character varying(96)") - .HasColumnName("ApplicationName"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("BrowserInfo"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("ClientId"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("ClientIpAddress"); - - b.Property("ClientName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ClientName"); - - b.Property("Comments") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("Comments"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("CorrelationId"); - - b.Property("Exceptions") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)") - .HasColumnName("Exceptions"); - - b.Property("ExecutionDuration") - .HasColumnType("integer") - .HasColumnName("ExecutionDuration"); - - b.Property("ExecutionTime") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("HttpMethod") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("HttpMethod"); - - b.Property("HttpStatusCode") - .HasColumnType("integer") - .HasColumnName("HttpStatusCode"); - - b.Property("ImpersonatorTenantId") - .HasColumnType("uuid") - .HasColumnName("ImpersonatorTenantId"); - - b.Property("ImpersonatorUserId") - .HasColumnType("uuid") - .HasColumnName("ImpersonatorUserId"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasColumnType("text"); - - b.Property("Url") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("Url"); - - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("UserId"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuditLogId") - .HasColumnType("uuid") - .HasColumnName("AuditLogId"); - - b.Property("ExecutionDuration") - .HasColumnType("integer") - .HasColumnName("ExecutionDuration"); - - b.Property("ExecutionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("ExecutionTime"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("MethodName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("MethodName"); - - b.Property("Parameters") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)") - .HasColumnName("Parameters"); - - b.Property("ServiceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("ServiceName"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuditLogId") - .HasColumnType("uuid") - .HasColumnName("AuditLogId"); - - b.Property("ChangeTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("ChangeTime"); - - b.Property("ChangeType") - .HasColumnType("smallint") - .HasColumnName("ChangeType"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("EntityId"); - - b.Property("EntityTenantId") - .HasColumnType("uuid"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("EntityTypeFullName"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("EntityChangeId") - .HasColumnType("uuid"); - - b.Property("NewValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("NewValue"); - - b.Property("OriginalValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("OriginalValue"); - - b.Property("PropertyName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("PropertyName"); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("PropertyTypeFullName"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("JobArgs") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("character varying(1048576)"); - - b.Property("JobName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("LastTryTime") - .HasColumnType("timestamp without time zone"); - - b.Property("NextTryTime") - .HasColumnType("timestamp without time zone"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((byte)15); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("AbpBackgroundJobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uuid"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("bytea"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("boolean"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Required") - .HasColumnType("boolean"); - - b.Property("ValueType") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("SourceTenantId") - .HasColumnType("uuid"); - - b.Property("SourceUserId") - .HasColumnType("uuid"); - - b.Property("TargetTenantId") - .HasColumnType("uuid"); - - b.Property("TargetUserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("boolean") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("boolean") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("character varying(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("character varying(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("character varying(96)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("character varying(196)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("character varying(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("uuid"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AllowedAccessTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ApiResourceId", "Scope"); - - b.ToTable("IdentityServerApiResourceScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("Expiration") - .HasColumnType("timestamp without time zone"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiResourceSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Emphasize") - .HasColumnType("boolean"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Required") - .HasColumnType("boolean"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.Property("ApiScopeId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ApiScopeId", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.Property("ApiScopeId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ApiScopeId", "Key", "Value"); - - b.ToTable("IdentityServerApiScopeProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("integer"); - - b.Property("AccessTokenLifetime") - .HasColumnType("integer"); - - b.Property("AccessTokenType") - .HasColumnType("integer"); - - b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("boolean"); - - b.Property("AllowOfflineAccess") - .HasColumnType("boolean"); - - b.Property("AllowPlainTextPkce") - .HasColumnType("boolean"); - - b.Property("AllowRememberConsent") - .HasColumnType("boolean"); - - b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("boolean"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("boolean"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("integer"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("boolean"); - - b.Property("BackChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentLifetime") - .HasColumnType("integer"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("integer"); - - b.Property("EnableLocalLogin") - .HasColumnType("boolean"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("boolean"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("IdentityTokenLifetime") - .HasColumnType("integer"); - - b.Property("IncludeJwtId") - .HasColumnType("boolean"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("RefreshTokenExpiration") - .HasColumnType("integer"); - - b.Property("RefreshTokenUsage") - .HasColumnType("integer"); - - b.Property("RequireClientSecret") - .HasColumnType("boolean"); - - b.Property("RequireConsent") - .HasColumnType("boolean"); - - b.Property("RequirePkce") - .HasColumnType("boolean"); - - b.Property("RequireRequestObject") - .HasColumnType("boolean"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("integer"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("boolean"); - - b.Property("UserCodeType") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("UserSsoLifetime") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("IdentityServerClients"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Origin") - .HasMaxLength(150) - .HasColumnType("character varying(150)"); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("GrantType") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Provider") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("PostLogoutRedirectUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ClientId", "Key", "Value"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("RedirectUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("Expiration") - .HasColumnType("timestamp without time zone"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(50000) - .HasColumnType("character varying(50000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode"); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("timestamp without time zone"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(50000) - .HasColumnType("character varying(50000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Expiration") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.HasIndex("SubjectId", "SessionId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Emphasize") - .HasColumnType("boolean"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Required") - .HasColumnType("boolean"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("IdentityResourceId", "Key", "Value"); - - b.ToTable("IdentityServerIdentityResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpSettings"); - }); - - modelBuilder.Entity("EventHub.Events.Event", b => - { - b.HasOne("EventHub.Countries.Country", null) - .WithMany() - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.NoAction); - - b.HasOne("EventHub.Organizations.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => - { - b.HasOne("EventHub.Events.Event", null) - .WithMany() - .HasForeignKey("EventId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => - { - b.HasOne("EventHub.Organizations.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("EventHub.Organizations.Organization", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("OwnerUserId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Properties") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("Properties") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Claims") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedCorsOrigins") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedGrantTypes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("IdentityProviderRestrictions") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("PostLogoutRedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Properties") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("RedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedScopes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("ClientSecrets") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("Properties") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Navigation("Actions"); - - b.Navigation("EntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Navigation("PropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Navigation("Properties"); - - b.Navigation("Scopes"); - - b.Navigation("Secrets"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Navigation("AllowedCorsOrigins"); - - b.Navigation("AllowedGrantTypes"); - - b.Navigation("AllowedScopes"); - - b.Navigation("Claims"); - - b.Navigation("ClientSecrets"); - - b.Navigation("IdentityProviderRestrictions"); - - b.Navigation("PostLogoutRedirectUris"); - - b.Navigation("Properties"); - - b.Navigation("RedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210428213802_Added_CountryName_To_Event.Designer.cs b/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210428213802_Added_CountryName_To_Event.Designer.cs deleted file mode 100644 index 33168d8..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210428213802_Added_CountryName_To_Event.Designer.cs +++ /dev/null @@ -1,2639 +0,0 @@ -// -using System; -using EventHub.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Volo.Abp.EntityFrameworkCore; - -namespace EventHub.Migrations -{ - [DbContext(typeof(EventHubMigrationsDbContext))] - [Migration("20210428213802_Added_CountryName_To_Event")] - partial class Added_CountryName_To_Event - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) - .HasAnnotation("Relational:MaxIdentifierLength", 63) - .HasAnnotation("ProductVersion", "5.0.5") - .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); - - modelBuilder.Entity("EventHub.Countries.Country", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("EhCountries"); - }); - - modelBuilder.Entity("EventHub.Events.Event", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Capacity") - .HasColumnType("integer"); - - b.Property("City") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountryId") - .HasColumnType("uuid"); - - b.Property("CountryName") - .HasColumnType("text"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("EndTime") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsEmailSentToMembers") - .HasColumnType("boolean"); - - b.Property("IsOnline") - .HasColumnType("boolean"); - - b.Property("IsRemindingEmailSent") - .HasColumnType("boolean"); - - b.Property("Language") - .HasMaxLength(16) - .HasColumnType("character varying(16)"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("OnlineLink") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("OrganizationId") - .HasColumnType("uuid"); - - b.Property("StartTime") - .HasColumnType("timestamp without time zone"); - - b.Property("TimingChangeCount") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Url") - .IsRequired() - .HasMaxLength(69) - .HasColumnType("character varying(69)"); - - b.Property("UrlCode") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("character varying(8)"); - - b.HasKey("Id"); - - b.HasIndex("CountryId"); - - b.HasIndex("IsEmailSentToMembers"); - - b.HasIndex("StartTime"); - - b.HasIndex("UrlCode"); - - b.HasIndex("IsRemindingEmailSent", "StartTime"); - - b.HasIndex("OrganizationId", "StartTime"); - - b.ToTable("EhEvents"); - }); - - modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("EventId") - .HasColumnType("uuid"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsTimingChangeEmailSent") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true) - .HasColumnName("IsTimingChangeEmailSent"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("EventId", "UserId"); - - b.ToTable("EhEventRegistrations"); - }); - - modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("OrganizationId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.HasIndex("OrganizationId", "UserId"); - - b.ToTable("EhOrganizationMemberships"); - }); - - modelBuilder.Entity("EventHub.Organizations.Organization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("FacebookUsername") - .HasColumnType("text"); - - b.Property("GitHubUsername") - .HasColumnType("text"); - - b.Property("InstagramUsername") - .HasColumnType("text"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("MediumUsername") - .HasColumnType("text"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("TwitterUsername") - .HasColumnType("text"); - - b.Property("Website") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("DisplayName"); - - b.HasIndex("Name"); - - b.HasIndex("OwnerUserId"); - - b.ToTable("EhOrganizations"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("character varying(96)") - .HasColumnName("ApplicationName"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("BrowserInfo"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("ClientId"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("ClientIpAddress"); - - b.Property("ClientName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ClientName"); - - b.Property("Comments") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("Comments"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("CorrelationId"); - - b.Property("Exceptions") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)") - .HasColumnName("Exceptions"); - - b.Property("ExecutionDuration") - .HasColumnType("integer") - .HasColumnName("ExecutionDuration"); - - b.Property("ExecutionTime") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("HttpMethod") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("HttpMethod"); - - b.Property("HttpStatusCode") - .HasColumnType("integer") - .HasColumnName("HttpStatusCode"); - - b.Property("ImpersonatorTenantId") - .HasColumnType("uuid") - .HasColumnName("ImpersonatorTenantId"); - - b.Property("ImpersonatorUserId") - .HasColumnType("uuid") - .HasColumnName("ImpersonatorUserId"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasColumnType("text"); - - b.Property("Url") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("Url"); - - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("UserId"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuditLogId") - .HasColumnType("uuid") - .HasColumnName("AuditLogId"); - - b.Property("ExecutionDuration") - .HasColumnType("integer") - .HasColumnName("ExecutionDuration"); - - b.Property("ExecutionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("ExecutionTime"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("MethodName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("MethodName"); - - b.Property("Parameters") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)") - .HasColumnName("Parameters"); - - b.Property("ServiceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("ServiceName"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuditLogId") - .HasColumnType("uuid") - .HasColumnName("AuditLogId"); - - b.Property("ChangeTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("ChangeTime"); - - b.Property("ChangeType") - .HasColumnType("smallint") - .HasColumnName("ChangeType"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("EntityId"); - - b.Property("EntityTenantId") - .HasColumnType("uuid"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("EntityTypeFullName"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("EntityChangeId") - .HasColumnType("uuid"); - - b.Property("NewValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("NewValue"); - - b.Property("OriginalValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("OriginalValue"); - - b.Property("PropertyName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("PropertyName"); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("PropertyTypeFullName"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("JobArgs") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("character varying(1048576)"); - - b.Property("JobName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("LastTryTime") - .HasColumnType("timestamp without time zone"); - - b.Property("NextTryTime") - .HasColumnType("timestamp without time zone"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((byte)15); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("AbpBackgroundJobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerId") - .HasColumnType("uuid"); - - b.Property("Content") - .HasMaxLength(2147483647) - .HasColumnType("bytea"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ContainerId"); - - b.HasIndex("TenantId", "ContainerId", "Name"); - - b.ToTable("AbpBlobs"); - }); - - modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name"); - - b.ToTable("AbpBlobContainers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsStatic") - .HasColumnType("boolean"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Required") - .HasColumnType("boolean"); - - b.Property("ValueType") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("SourceTenantId") - .HasColumnType("uuid"); - - b.Property("SourceUserId") - .HasColumnType("uuid"); - - b.Property("TargetTenantId") - .HasColumnType("uuid"); - - b.Property("TargetUserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("AbpLinkUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDefault") - .HasColumnType("boolean") - .HasColumnName("IsDefault"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("IsPublic"); - - b.Property("IsStatic") - .HasColumnType("boolean") - .HasColumnName("IsStatic"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("character varying(96)"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("character varying(96)"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("character varying(96)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSecurityLogs"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("Email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("EmailConfirmed"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsExternal"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("Name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("NormalizedEmail"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("NormalizedUserName"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("PasswordHash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("PhoneNumber"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("PhoneNumberConfirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("SecurityStamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("Surname"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("TwoFactorEnabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("UserName"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("character varying(196)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uuid"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("character varying(95)") - .HasColumnName("Code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("DisplayName"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("ParentId") - .HasColumnType("uuid"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AllowedAccessTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ApiResourceId", "Type"); - - b.ToTable("IdentityServerApiResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ApiResourceId", "Key", "Value"); - - b.ToTable("IdentityServerApiResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ApiResourceId", "Scope"); - - b.ToTable("IdentityServerApiResourceScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.Property("ApiResourceId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("Expiration") - .HasColumnType("timestamp without time zone"); - - b.HasKey("ApiResourceId", "Type", "Value"); - - b.ToTable("IdentityServerApiResourceSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Emphasize") - .HasColumnType("boolean"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Required") - .HasColumnType("boolean"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerApiScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.Property("ApiScopeId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ApiScopeId", "Type"); - - b.ToTable("IdentityServerApiScopeClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.Property("ApiScopeId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ApiScopeId", "Key", "Value"); - - b.ToTable("IdentityServerApiScopeProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AbsoluteRefreshTokenLifetime") - .HasColumnType("integer"); - - b.Property("AccessTokenLifetime") - .HasColumnType("integer"); - - b.Property("AccessTokenType") - .HasColumnType("integer"); - - b.Property("AllowAccessTokensViaBrowser") - .HasColumnType("boolean"); - - b.Property("AllowOfflineAccess") - .HasColumnType("boolean"); - - b.Property("AllowPlainTextPkce") - .HasColumnType("boolean"); - - b.Property("AllowRememberConsent") - .HasColumnType("boolean"); - - b.Property("AllowedIdentityTokenSigningAlgorithms") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("AlwaysIncludeUserClaimsInIdToken") - .HasColumnType("boolean"); - - b.Property("AlwaysSendClientClaims") - .HasColumnType("boolean"); - - b.Property("AuthorizationCodeLifetime") - .HasColumnType("integer"); - - b.Property("BackChannelLogoutSessionRequired") - .HasColumnType("boolean"); - - b.Property("BackChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ClientClaimsPrefix") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsentLifetime") - .HasColumnType("integer"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DeviceCodeLifetime") - .HasColumnType("integer"); - - b.Property("EnableLocalLogin") - .HasColumnType("boolean"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("FrontChannelLogoutSessionRequired") - .HasColumnType("boolean"); - - b.Property("FrontChannelLogoutUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("IdentityTokenLifetime") - .HasColumnType("integer"); - - b.Property("IncludeJwtId") - .HasColumnType("boolean"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("LogoUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("PairWiseSubjectSalt") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ProtocolType") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("RefreshTokenExpiration") - .HasColumnType("integer"); - - b.Property("RefreshTokenUsage") - .HasColumnType("integer"); - - b.Property("RequireClientSecret") - .HasColumnType("boolean"); - - b.Property("RequireConsent") - .HasColumnType("boolean"); - - b.Property("RequirePkce") - .HasColumnType("boolean"); - - b.Property("RequireRequestObject") - .HasColumnType("boolean"); - - b.Property("SlidingRefreshTokenLifetime") - .HasColumnType("integer"); - - b.Property("UpdateAccessTokenClaimsOnRefresh") - .HasColumnType("boolean"); - - b.Property("UserCodeType") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("UserSsoLifetime") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("IdentityServerClients"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Origin") - .HasMaxLength(150) - .HasColumnType("character varying(150)"); - - b.HasKey("ClientId", "Origin"); - - b.ToTable("IdentityServerClientCorsOrigins"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("GrantType") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.HasKey("ClientId", "GrantType"); - - b.ToTable("IdentityServerClientGrantTypes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Provider") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ClientId", "Provider"); - - b.ToTable("IdentityServerClientIdPRestrictions"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("PostLogoutRedirectUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ClientId", "PostLogoutRedirectUri"); - - b.ToTable("IdentityServerClientPostLogoutRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ClientId", "Key", "Value"); - - b.ToTable("IdentityServerClientProperties"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("RedirectUri") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("ClientId", "RedirectUri"); - - b.ToTable("IdentityServerClientRedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Scope") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("ClientId", "Scope"); - - b.ToTable("IdentityServerClientScopes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("Expiration") - .HasColumnType("timestamp without time zone"); - - b.HasKey("ClientId", "Type", "Value"); - - b.ToTable("IdentityServerClientSecrets"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(50000) - .HasColumnType("character varying(50000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("DeviceCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Expiration") - .IsRequired() - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("UserCode") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("Id"); - - b.HasIndex("DeviceCode") - .IsUnique(); - - b.HasIndex("Expiration"); - - b.HasIndex("UserCode"); - - b.ToTable("IdentityServerDeviceFlowCodes"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => - { - b.Property("Key") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ClientId") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConsumedTime") - .HasColumnType("timestamp without time zone"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone"); - - b.Property("Data") - .IsRequired() - .HasMaxLength(50000) - .HasColumnType("character varying(50000)"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Expiration") - .HasColumnType("timestamp without time zone"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("Id") - .HasColumnType("uuid"); - - b.Property("SessionId") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("SubjectId") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.HasKey("Key"); - - b.HasIndex("Expiration"); - - b.HasIndex("SubjectId", "ClientId", "Type"); - - b.HasIndex("SubjectId", "SessionId", "Type"); - - b.ToTable("IdentityServerPersistedGrants"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("CreatorId"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("DeletionTime"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayName") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Emphasize") - .HasColumnType("boolean"); - - b.Property("Enabled") - .HasColumnType("boolean"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Required") - .HasColumnType("boolean"); - - b.Property("ShowInDiscoveryDocument") - .HasColumnType("boolean"); - - b.HasKey("Id"); - - b.ToTable("IdentityServerIdentityResources"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uuid"); - - b.Property("Type") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.HasKey("IdentityResourceId", "Type"); - - b.ToTable("IdentityServerIdentityResourceClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.Property("IdentityResourceId") - .HasColumnType("uuid"); - - b.Property("Key") - .HasMaxLength(250) - .HasColumnType("character varying(250)"); - - b.Property("Value") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.HasKey("IdentityResourceId", "Key", "Value"); - - b.ToTable("IdentityServerIdentityResourceProperties"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpSettings"); - }); - - modelBuilder.Entity("EventHub.Events.Event", b => - { - b.HasOne("EventHub.Countries.Country", null) - .WithMany() - .HasForeignKey("CountryId") - .OnDelete(DeleteBehavior.NoAction); - - b.HasOne("EventHub.Organizations.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => - { - b.HasOne("EventHub.Events.Event", null) - .WithMany() - .HasForeignKey("EventId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => - { - b.HasOne("EventHub.Organizations.Organization", null) - .WithMany() - .HasForeignKey("OrganizationId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - modelBuilder.Entity("EventHub.Organizations.Organization", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("OwnerUserId") - .OnDelete(DeleteBehavior.NoAction) - .IsRequired(); - }); - - 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.BlobStoring.Database.DatabaseBlob", b => - { - b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) - .WithMany() - .HasForeignKey("ContainerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("UserClaims") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Properties") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Scopes") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) - .WithMany("Secrets") - .HasForeignKey("ApiResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("UserClaims") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) - .WithMany("Properties") - .HasForeignKey("ApiScopeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Claims") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedCorsOrigins") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedGrantTypes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("IdentityProviderRestrictions") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("PostLogoutRedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("Properties") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("RedirectUris") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("AllowedScopes") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => - { - b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) - .WithMany("ClientSecrets") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("UserClaims") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => - { - b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) - .WithMany("Properties") - .HasForeignKey("IdentityResourceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Navigation("Actions"); - - b.Navigation("EntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Navigation("PropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Navigation("Claims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Navigation("Claims"); - - b.Navigation("Logins"); - - b.Navigation("OrganizationUnits"); - - b.Navigation("Roles"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Navigation("Roles"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => - { - b.Navigation("Properties"); - - b.Navigation("Scopes"); - - b.Navigation("Secrets"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => - { - b.Navigation("AllowedCorsOrigins"); - - b.Navigation("AllowedGrantTypes"); - - b.Navigation("AllowedScopes"); - - b.Navigation("Claims"); - - b.Navigation("ClientSecrets"); - - b.Navigation("IdentityProviderRestrictions"); - - b.Navigation("PostLogoutRedirectUris"); - - b.Navigation("Properties"); - - b.Navigation("RedirectUris"); - }); - - modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => - { - b.Navigation("Properties"); - - b.Navigation("UserClaims"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210428213802_Added_CountryName_To_Event.cs b/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210428213802_Added_CountryName_To_Event.cs deleted file mode 100644 index 27d6f06..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210428213802_Added_CountryName_To_Event.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EventHub.Migrations -{ - public partial class Added_CountryName_To_Event : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "CountryName", - table: "EhEvents", - type: "text", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "CountryName", - table: "EhEvents"); - } - } -} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210614064205_Moved_IsTimingChangeEmailSent_To_Event.cs b/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210614064205_Moved_IsTimingChangeEmailSent_To_Event.cs deleted file mode 100644 index 564c7eb..0000000 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210614064205_Moved_IsTimingChangeEmailSent_To_Event.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EventHub.Migrations -{ - public partial class Moved_IsTimingChangeEmailSent_To_Event : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsTimingChangeEmailSent", - table: "EhEventRegistrations"); - - migrationBuilder.AddColumn( - name: "IsTimingChangeEmailSent", - table: "EhEvents", - type: "boolean", - nullable: false, - defaultValue: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "IsTimingChangeEmailSent", - table: "EhEvents"); - - migrationBuilder.AddColumn( - name: "IsTimingChangeEmailSent", - table: "EhEventRegistrations", - type: "boolean", - nullable: false, - defaultValue: true); - } - } -} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs similarity index 93% rename from src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs rename to src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs index da7beb4..124d2a0 100644 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs @@ -27,7 +27,7 @@ namespace EventHub.EntityFrameworkCore */ await _serviceProvider - .GetRequiredService() + .GetRequiredService() .Database .MigrateAsync(); } diff --git a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs index 19bf797..cf106ff 100644 --- a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs @@ -4,12 +4,16 @@ using EventHub.Events.Registrations; using EventHub.Organizations; using EventHub.Organizations.Memberships; using Microsoft.EntityFrameworkCore; -using EventHub.Users; +using Volo.Abp.AuditLogging.EntityFrameworkCore; +using Volo.Abp.BackgroundJobs.EntityFrameworkCore; +using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.Identity; -using Volo.Abp.Users.EntityFrameworkCore; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.IdentityServer.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace EventHub.EntityFrameworkCore { @@ -23,14 +27,26 @@ namespace EventHub.EntityFrameworkCore * used modules (as explained above). See EventHubMigrationsDbContext for migrations. */ [ConnectionStringName("Default")] - public class EventHubDbContext : AbpDbContext + public class EventHubDbContext : + AbpDbContext, + IIdentityDbContext { - public DbSet Users { get; set; } public DbSet Organizations { get; set; } public DbSet OrganizationMemberships { get; set; } public DbSet Events { get; set; } public DbSet EventRegistrations { get; set; } public DbSet Countries { get; set; } + + #region Entities from the used modules + + public DbSet Users { get; set; } + public DbSet Roles { get; set; } + public DbSet ClaimTypes { get; set; } + public DbSet OrganizationUnits { get; set; } + public DbSet SecurityLogs { get; set; } + public DbSet LinkUsers { get; set; } + + #endregion public EventHubDbContext(DbContextOptions options) : base(options) @@ -42,23 +58,15 @@ namespace EventHub.EntityFrameworkCore { base.OnModelCreating(builder); - /* Configure the shared tables (with included modules) here */ - - builder.Entity(b => - { - b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser - - b.ConfigureByConvention(); - b.ConfigureAbpUser(); - - /* Configure mappings for your additional properties - * Also see the EventHubEfCoreEntityExtensionMappings class - */ - }); - - /* Configure your own tables/entities inside the ConfigureEventHub method */ + builder.ConfigurePermissionManagement(); + builder.ConfigureSettingManagement(); + builder.ConfigureBackgroundJobs(); + builder.ConfigureAuditLogging(); + builder.ConfigureIdentity(); + builder.ConfigureIdentityServer(); + builder.ConfigureBlobStoring(); - builder.ConfigureEventHub(false); + builder.ConfigureEventHub(); } } } diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextFactory.cs similarity index 72% rename from src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs rename to src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextFactory.cs index e1887c7..4a647b8 100644 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextFactory.cs @@ -7,18 +7,18 @@ namespace EventHub.EntityFrameworkCore { /* This class is needed for EF Core console commands * (like Add-Migration and Update-Database commands) */ - public class EventHubMigrationsDbContextFactory : IDesignTimeDbContextFactory + public class EventHubDbContextFactory : IDesignTimeDbContextFactory { - public EventHubMigrationsDbContext CreateDbContext(string[] args) + public EventHubDbContext CreateDbContext(string[] args) { EventHubEfCoreEntityExtensionMappings.Configure(); var configuration = BuildConfiguration(); - var builder = new DbContextOptionsBuilder() + var builder = new DbContextOptionsBuilder() .UseNpgsql(configuration.GetConnectionString("Default")); - return new EventHubMigrationsDbContext(builder.Options); + return new EventHubDbContext(builder.Options); } private static IConfigurationRoot BuildConfiguration() diff --git a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs index 966e673..262d2bd 100644 --- a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs @@ -12,9 +12,7 @@ namespace EventHub.EntityFrameworkCore { public static class EventHubDbContextModelCreatingExtensions { - public static void ConfigureEventHub( - this ModelBuilder builder, - bool isMigrationDbContext) + public static void ConfigureEventHub(this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -29,11 +27,7 @@ namespace EventHub.EntityFrameworkCore b.Property(x => x.Name).IsRequired().HasMaxLength(OrganizationConsts.MaxNameLength); b.Property(x => x.DisplayName).IsRequired().HasMaxLength(OrganizationConsts.MaxDisplayNameLength); b.Property(x => x.Description).IsRequired().HasMaxLength(OrganizationConsts.MaxDescriptionNameLength); - - if (isMigrationDbContext) - { - b.HasOne().WithMany().HasForeignKey(x => x.OwnerUserId).IsRequired().OnDelete(DeleteBehavior.NoAction); - } + b.HasOne().WithMany().HasForeignKey(x => x.OwnerUserId).IsRequired().OnDelete(DeleteBehavior.NoAction); b.HasIndex(x => x.Name); b.HasIndex(x => x.DisplayName); @@ -46,11 +40,7 @@ namespace EventHub.EntityFrameworkCore b.ConfigureByConvention(); b.HasOne().WithMany().HasForeignKey(x => x.OrganizationId).IsRequired().OnDelete(DeleteBehavior.NoAction); - - if (isMigrationDbContext) - { - b.HasOne().WithMany().HasForeignKey(x => x.UserId).IsRequired().OnDelete(DeleteBehavior.NoAction); - } + b.HasOne().WithMany().HasForeignKey(x => x.UserId).IsRequired().OnDelete(DeleteBehavior.NoAction); b.HasIndex(x => new {x.OrganizationId, x.UserId}); }); @@ -89,11 +79,7 @@ namespace EventHub.EntityFrameworkCore b.ConfigureByConvention(); b.HasOne().WithMany().HasForeignKey(x => x.EventId).IsRequired().OnDelete(DeleteBehavior.NoAction); - - if (isMigrationDbContext) - { - b.HasOne().WithMany().HasForeignKey(x => x.UserId).IsRequired().OnDelete(DeleteBehavior.NoAction); - } + b.HasOne().WithMany().HasForeignKey(x => x.UserId).IsRequired().OnDelete(DeleteBehavior.NoAction); b.HasIndex(x => new {x.EventId, x.UserId}); }); diff --git a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs index 78308d6..2e44a19 100644 --- a/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs +++ b/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs @@ -34,6 +34,8 @@ namespace EventHub.EntityFrameworkCore { context.Services.AddAbpDbContext(options => { + options.ReplaceDbContext(); + /* Remove "includeAllEntities: true" to create * default repositories only for aggregate roots */ options.AddDefaultRepositories(includeAllEntities: true); diff --git a/src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj b/src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj index da7aebe..5e3858d 100644 --- a/src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj +++ b/src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj @@ -7,6 +7,10 @@ EventHub + + + + diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210614064205_Moved_IsTimingChangeEmailSent_To_Event.Designer.cs b/src/EventHub.EntityFrameworkCore/Migrations/20210623133429_Initial.Designer.cs similarity index 99% rename from src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210614064205_Moved_IsTimingChangeEmailSent_To_Event.Designer.cs rename to src/EventHub.EntityFrameworkCore/Migrations/20210623133429_Initial.Designer.cs index d0f9043..5adb073 100644 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210614064205_Moved_IsTimingChangeEmailSent_To_Event.Designer.cs +++ b/src/EventHub.EntityFrameworkCore/Migrations/20210623133429_Initial.Designer.cs @@ -10,9 +10,9 @@ using Volo.Abp.EntityFrameworkCore; namespace EventHub.Migrations { - [DbContext(typeof(EventHubMigrationsDbContext))] - [Migration("20210614064205_Moved_IsTimingChangeEmailSent_To_Event")] - partial class Moved_IsTimingChangeEmailSent_To_Event + [DbContext(typeof(EventHubDbContext))] + [Migration("20210623133429_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -26,7 +26,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Countries.Country", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Name") @@ -44,7 +43,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Events.Event", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Capacity") @@ -174,7 +172,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -213,7 +210,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -252,7 +248,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Organizations.Organization", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -728,7 +723,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -775,7 +769,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("SourceTenantId") @@ -801,7 +794,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -878,7 +870,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Action") @@ -953,7 +944,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AccessFailedCount") @@ -1233,7 +1223,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs b/src/EventHub.EntityFrameworkCore/Migrations/20210623133429_Initial.cs similarity index 98% rename from src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs rename to src/EventHub.EntityFrameworkCore/Migrations/20210623133429_Initial.cs index 717ad10..77cb1dc 100644 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20210421100913_Initial.cs +++ b/src/EventHub.EntityFrameworkCore/Migrations/20210623133429_Initial.cs @@ -1,1579 +1,1580 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace EventHub.Migrations -{ - public partial class Initial : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AbpAuditLogs", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), - UserId = table.Column(type: "uuid", nullable: true), - UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - TenantId = table.Column(type: "uuid", nullable: true), - TenantName = table.Column(type: "text", nullable: true), - ImpersonatorUserId = table.Column(type: "uuid", nullable: true), - ImpersonatorTenantId = table.Column(type: "uuid", nullable: true), - ExecutionTime = table.Column(type: "timestamp without time zone", nullable: false), - ExecutionDuration = table.Column(type: "integer", nullable: false), - ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - ClientName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), - ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - HttpMethod = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), - Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - Exceptions = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true), - Comments = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - HttpStatusCode = table.Column(type: "integer", nullable: true), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpBackgroundJobs", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - JobName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - JobArgs = table.Column(type: "character varying(1048576)", maxLength: 1048576, nullable: false), - TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - NextTryTime = table.Column(type: "timestamp without time zone", nullable: false), - LastTryTime = table.Column(type: "timestamp without time zone", nullable: true), - IsAbandoned = table.Column(type: "boolean", nullable: false, defaultValue: false), - Priority = table.Column(type: "smallint", nullable: false, defaultValue: (byte)15), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpBlobContainers", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpClaimTypes", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Required = table.Column(type: "boolean", nullable: false), - IsStatic = table.Column(type: "boolean", nullable: false), - Regex = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - RegexDescription = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), - Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "integer", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpLinkUsers", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - SourceUserId = table.Column(type: "uuid", nullable: false), - SourceTenantId = table.Column(type: "uuid", nullable: true), - TargetUserId = table.Column(type: "uuid", nullable: false), - TargetTenantId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnits", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - ParentId = table.Column(type: "uuid", nullable: true), - Code = table.Column(type: "character varying(95)", maxLength: 95, nullable: false), - DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); - table.ForeignKey( - name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", - column: x => x.ParentId, - principalTable: "AbpOrganizationUnits", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - }); - - migrationBuilder.CreateTable( - name: "AbpPermissionGrants", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpRoles", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - IsDefault = table.Column(type: "boolean", nullable: false), - IsStatic = table.Column(type: "boolean", nullable: false), - IsPublic = table.Column(type: "boolean", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSecurityLogs", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), - Identity = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), - Action = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), - UserId = table.Column(type: "uuid", nullable: true), - UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpSettings", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), - ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpSettings", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AbpUsers", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - NormalizedUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), - Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - NormalizedEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), - PasswordHash = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - SecurityStamp = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - IsExternal = table.Column(type: "boolean", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), - TwoFactorEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "timestamp with time zone", nullable: true), - LockoutEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "integer", nullable: false, defaultValue: 0), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "EhCountries", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_EhCountries", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResources", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), - Enabled = table.Column(type: "boolean", nullable: false), - AllowedAccessTokenSigningAlgorithms = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), - ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopes", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Enabled = table.Column(type: "boolean", nullable: false), - Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), - Required = table.Column(type: "boolean", nullable: false), - Emphasize = table.Column(type: "boolean", nullable: false), - ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClients", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - ClientName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), - ClientUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - LogoUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - Enabled = table.Column(type: "boolean", nullable: false), - ProtocolType = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - RequireClientSecret = table.Column(type: "boolean", nullable: false), - RequireConsent = table.Column(type: "boolean", nullable: false), - AllowRememberConsent = table.Column(type: "boolean", nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(type: "boolean", nullable: false), - RequirePkce = table.Column(type: "boolean", nullable: false), - AllowPlainTextPkce = table.Column(type: "boolean", nullable: false), - RequireRequestObject = table.Column(type: "boolean", nullable: false), - AllowAccessTokensViaBrowser = table.Column(type: "boolean", nullable: false), - FrontChannelLogoutUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - FrontChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false), - BackChannelLogoutUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - BackChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false), - AllowOfflineAccess = table.Column(type: "boolean", nullable: false), - IdentityTokenLifetime = table.Column(type: "integer", nullable: false), - AllowedIdentityTokenSigningAlgorithms = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), - AccessTokenLifetime = table.Column(type: "integer", nullable: false), - AuthorizationCodeLifetime = table.Column(type: "integer", nullable: false), - ConsentLifetime = table.Column(type: "integer", nullable: true), - AbsoluteRefreshTokenLifetime = table.Column(type: "integer", nullable: false), - SlidingRefreshTokenLifetime = table.Column(type: "integer", nullable: false), - RefreshTokenUsage = table.Column(type: "integer", nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(type: "boolean", nullable: false), - RefreshTokenExpiration = table.Column(type: "integer", nullable: false), - AccessTokenType = table.Column(type: "integer", nullable: false), - EnableLocalLogin = table.Column(type: "boolean", nullable: false), - IncludeJwtId = table.Column(type: "boolean", nullable: false), - AlwaysSendClientClaims = table.Column(type: "boolean", nullable: false), - ClientClaimsPrefix = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - PairWiseSubjectSalt = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - UserSsoLifetime = table.Column(type: "integer", nullable: true), - UserCodeType = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), - DeviceCodeLifetime = table.Column(type: "integer", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClients", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerDeviceFlowCodes", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - DeviceCode = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - UserCode = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - SubjectId = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - SessionId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), - ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - Expiration = table.Column(type: "timestamp without time zone", nullable: false), - Data = table.Column(type: "character varying(50000)", maxLength: 50000, nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResources", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), - Enabled = table.Column(type: "boolean", nullable: false), - Required = table.Column(type: "boolean", nullable: false), - Emphasize = table.Column(type: "boolean", nullable: false), - ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerPersistedGrants", - columns: table => new - { - Key = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - Type = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), - SubjectId = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - SessionId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), - ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - Description = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - Expiration = table.Column(type: "timestamp without time zone", nullable: true), - ConsumedTime = table.Column(type: "timestamp without time zone", nullable: true), - Data = table.Column(type: "character varying(50000)", maxLength: 50000, nullable: false), - Id = table.Column(type: "uuid", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); - }); - - migrationBuilder.CreateTable( - name: "AbpAuditLogActions", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - AuditLogId = table.Column(type: "uuid", nullable: false), - ServiceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - MethodName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), - Parameters = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - ExecutionTime = table.Column(type: "timestamp without time zone", nullable: false), - ExecutionDuration = table.Column(type: "integer", nullable: false), - ExtraProperties = table.Column(type: "text", 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(type: "uuid", nullable: false), - AuditLogId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - ChangeTime = table.Column(type: "timestamp without time zone", nullable: false), - ChangeType = table.Column(type: "smallint", nullable: false), - EntityTenantId = table.Column(type: "uuid", nullable: true), - EntityId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - EntityTypeFullName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "text", 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: "AbpBlobs", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - ContainerId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Content = table.Column(type: "bytea", maxLength: 2147483647, nullable: true), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpBlobs", x => x.Id); - table.ForeignKey( - name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", - column: x => x.ContainerId, - principalTable: "AbpBlobContainers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpOrganizationUnitRoles", - columns: table => new - { - RoleId = table.Column(type: "uuid", nullable: false), - OrganizationUnitId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); - table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~", - 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: "AbpRoleClaims", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - RoleId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) - }, - 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(type: "uuid", nullable: false), - UserId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) - }, - 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(type: "uuid", nullable: false), - LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - ProviderKey = table.Column(type: "character varying(196)", maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(type: "character varying(128)", 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: "AbpUserOrganizationUnits", - columns: table => new - { - UserId = table.Column(type: "uuid", nullable: false), - OrganizationUnitId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); - table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~", - 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.CreateTable( - name: "AbpUserRoles", - columns: table => new - { - UserId = table.Column(type: "uuid", nullable: false), - RoleId = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", 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(type: "uuid", nullable: false), - LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - Value = table.Column(type: "text", 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: "EhOrganizations", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - OwnerUserId = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: false), - Website = table.Column(type: "text", nullable: true), - TwitterUsername = table.Column(type: "text", nullable: true), - GitHubUsername = table.Column(type: "text", nullable: true), - FacebookUsername = table.Column(type: "text", nullable: true), - InstagramUsername = table.Column(type: "text", nullable: true), - MediumUsername = table.Column(type: "text", nullable: true), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_EhOrganizations", x => x.Id); - table.ForeignKey( - name: "FK_EhOrganizations_AbpUsers_OwnerUserId", - column: x => x.OwnerUserId, - principalTable: "AbpUsers", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceClaims", - columns: table => new - { - Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - ApiResourceId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceProperties", - columns: table => new - { - ApiResourceId = table.Column(type: "uuid", nullable: false), - Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResour~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceScopes", - columns: table => new - { - ApiResourceId = table.Column(type: "uuid", nullable: false), - Scope = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); - table.ForeignKey( - name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_~", - column: x => x.ApiResourceId, - principalTable: "IdentityServerApiResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiResourceSecrets", - columns: table => new - { - Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), - ApiResourceId = table.Column(type: "uuid", nullable: false), - Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), - Expiration = table.Column(type: "timestamp without time zone", 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: "IdentityServerApiScopeClaims", - columns: table => new - { - Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - ApiScopeId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiSco~", - column: x => x.ApiScopeId, - principalTable: "IdentityServerApiScopes", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerApiScopeProperties", - columns: table => new - { - ApiScopeId = table.Column(type: "uuid", nullable: false), - Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Ap~", - column: x => x.ApiScopeId, - principalTable: "IdentityServerApiScopes", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientClaims", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(250)", 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(type: "uuid", nullable: false), - Origin = table.Column(type: "character varying(150)", maxLength: 150, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); - table.ForeignKey( - name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Clien~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientGrantTypes", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - GrantType = table.Column(type: "character varying(250)", maxLength: 250, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); - table.ForeignKey( - name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_Client~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientIdPRestrictions", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - Provider = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); - table.ForeignKey( - name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_C~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientPostLogoutRedirectUris", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - PostLogoutRedirectUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCl~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientProperties", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerClientProperties_IdentityServerClients_Client~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientRedirectUris", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - RedirectUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); - table.ForeignKey( - name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clie~", - column: x => x.ClientId, - principalTable: "IdentityServerClients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerClientScopes", - columns: table => new - { - ClientId = table.Column(type: "uuid", nullable: false), - Scope = table.Column(type: "character varying(200)", 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(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), - ClientId = table.Column(type: "uuid", nullable: false), - Description = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - Expiration = table.Column(type: "timestamp without time zone", 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: "IdentityServerIdentityResourceClaims", - columns: table => new - { - Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), - IdentityResourceId = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); - table.ForeignKey( - name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentity~", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "IdentityServerIdentityResourceProperties", - columns: table => new - { - IdentityResourceId = table.Column(type: "uuid", nullable: false), - Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), - Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); - table.ForeignKey( - name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIden~", - column: x => x.IdentityResourceId, - principalTable: "IdentityServerIdentityResources", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AbpEntityPropertyChanges", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - TenantId = table.Column(type: "uuid", nullable: true), - EntityChangeId = table.Column(type: "uuid", nullable: false), - NewValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - OriginalValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - PropertyName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(type: "character varying(64)", 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.CreateTable( - name: "EhEvents", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - OrganizationId = table.Column(type: "uuid", nullable: false), - UrlCode = table.Column(type: "character varying(8)", maxLength: 8, nullable: false), - Url = table.Column(type: "character varying(69)", maxLength: 69, nullable: false), - Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - StartTime = table.Column(type: "timestamp without time zone", nullable: false), - EndTime = table.Column(type: "timestamp without time zone", nullable: false), - Description = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false), - IsOnline = table.Column(type: "boolean", nullable: false), - OnlineLink = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - CountryId = table.Column(type: "uuid", nullable: true), - City = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - Language = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), - Capacity = table.Column(type: "integer", nullable: true), - IsRemindingEmailSent = table.Column(type: "boolean", nullable: false), - IsEmailSentToMembers = table.Column(type: "boolean", nullable: false), - TimingChangeCount = table.Column(type: "integer", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), - LastModifierId = table.Column(type: "uuid", nullable: true), - IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uuid", nullable: true), - DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_EhEvents", x => x.Id); - table.ForeignKey( - name: "FK_EhEvents_EhCountries_CountryId", - column: x => x.CountryId, - principalTable: "EhCountries", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_EhEvents_EhOrganizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "EhOrganizations", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "EhOrganizationMemberships", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - OrganizationId = table.Column(type: "uuid", nullable: false), - UserId = table.Column(type: "uuid", nullable: false), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_EhOrganizationMemberships", x => x.Id); - table.ForeignKey( - name: "FK_EhOrganizationMemberships_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_EhOrganizationMemberships_EhOrganizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "EhOrganizations", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "EhEventRegistrations", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - EventId = table.Column(type: "uuid", nullable: false), - UserId = table.Column(type: "uuid", nullable: false), - IsTimingChangeEmailSent = table.Column(type: "boolean", nullable: false, defaultValue: true), - ExtraProperties = table.Column(type: "text", nullable: true), - ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "timestamp without time zone", nullable: false), - CreatorId = table.Column(type: "uuid", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_EhEventRegistrations", x => x.Id); - table.ForeignKey( - name: "FK_EhEventRegistrations_AbpUsers_UserId", - column: x => x.UserId, - principalTable: "AbpUsers", - principalColumn: "Id"); - table.ForeignKey( - name: "FK_EhEventRegistrations_EhEvents_EventId", - column: x => x.EventId, - principalTable: "EhEvents", - principalColumn: "Id"); - }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_AuditLogId", - table: "AbpAuditLogActions", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~", - table: "AbpAuditLogActions", - columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", - table: "AbpAuditLogs", - columns: new[] { "TenantId", "UserId", "ExecutionTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", - table: "AbpBackgroundJobs", - columns: new[] { "IsAbandoned", "NextTryTime" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobContainers_TenantId_Name", - table: "AbpBlobContainers", - columns: new[] { "TenantId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_ContainerId", - table: "AbpBlobs", - column: "ContainerId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpBlobs_TenantId_ContainerId_Name", - table: "AbpBlobs", - columns: new[] { "TenantId", "ContainerId", "Name" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_AuditLogId", - table: "AbpEntityChanges", - column: "AuditLogId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", - table: "AbpEntityChanges", - columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpEntityPropertyChanges_EntityChangeId", - table: "AbpEntityPropertyChanges", - column: "EntityChangeId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~", - table: "AbpLinkUsers", - columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", - table: "AbpOrganizationUnitRoles", - columns: new[] { "RoleId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_Code", - table: "AbpOrganizationUnits", - column: "Code"); - - migrationBuilder.CreateIndex( - name: "IX_AbpOrganizationUnits_ParentId", - table: "AbpOrganizationUnits", - column: "ParentId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", - table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoleClaims_RoleId", - table: "AbpRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpRoles_NormalizedName", - table: "AbpRoles", - column: "NormalizedName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Action", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Action" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_ApplicationName", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "ApplicationName" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_Identity", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "Identity" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSecurityLogs_TenantId_UserId", - table: "AbpSecurityLogs", - columns: new[] { "TenantId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpSettings_Name_ProviderName_ProviderKey", - table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserClaims_UserId", - table: "AbpUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserLogins_LoginProvider_ProviderKey", - table: "AbpUserLogins", - columns: new[] { "LoginProvider", "ProviderKey" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", - table: "AbpUserOrganizationUnits", - columns: new[] { "UserId", "OrganizationUnitId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUserRoles_RoleId_UserId", - table: "AbpUserRoles", - columns: new[] { "RoleId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_Email", - table: "AbpUsers", - column: "Email"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedEmail", - table: "AbpUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_NormalizedUserName", - table: "AbpUsers", - column: "NormalizedUserName"); - - migrationBuilder.CreateIndex( - name: "IX_AbpUsers_UserName", - table: "AbpUsers", - column: "UserName"); - - migrationBuilder.CreateIndex( - name: "IX_EhCountries_Name", - table: "EhCountries", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_EhEventRegistrations_EventId_UserId", - table: "EhEventRegistrations", - columns: new[] { "EventId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_EhEventRegistrations_UserId", - table: "EhEventRegistrations", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_EhEvents_CountryId", - table: "EhEvents", - column: "CountryId"); - - migrationBuilder.CreateIndex( - name: "IX_EhEvents_IsEmailSentToMembers", - table: "EhEvents", - column: "IsEmailSentToMembers"); - - migrationBuilder.CreateIndex( - name: "IX_EhEvents_IsRemindingEmailSent_StartTime", - table: "EhEvents", - columns: new[] { "IsRemindingEmailSent", "StartTime" }); - - migrationBuilder.CreateIndex( - name: "IX_EhEvents_OrganizationId_StartTime", - table: "EhEvents", - columns: new[] { "OrganizationId", "StartTime" }); - - migrationBuilder.CreateIndex( - name: "IX_EhEvents_StartTime", - table: "EhEvents", - column: "StartTime"); - - migrationBuilder.CreateIndex( - name: "IX_EhEvents_UrlCode", - table: "EhEvents", - column: "UrlCode"); - - migrationBuilder.CreateIndex( - name: "IX_EhOrganizationMemberships_OrganizationId_UserId", - table: "EhOrganizationMemberships", - columns: new[] { "OrganizationId", "UserId" }); - - migrationBuilder.CreateIndex( - name: "IX_EhOrganizationMemberships_UserId", - table: "EhOrganizationMemberships", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_EhOrganizations_DisplayName", - table: "EhOrganizations", - column: "DisplayName"); - - migrationBuilder.CreateIndex( - name: "IX_EhOrganizations_Name", - table: "EhOrganizations", - column: "Name"); - - migrationBuilder.CreateIndex( - name: "IX_EhOrganizations_OwnerUserId", - table: "EhOrganizations", - column: "OwnerUserId"); - - 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"); - - 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" }); - - migrationBuilder.CreateIndex( - name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", - table: "IdentityServerPersistedGrants", - columns: new[] { "SubjectId", "SessionId", "Type" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AbpAuditLogActions"); - - migrationBuilder.DropTable( - name: "AbpBackgroundJobs"); - - migrationBuilder.DropTable( - name: "AbpBlobs"); - - migrationBuilder.DropTable( - name: "AbpClaimTypes"); - - migrationBuilder.DropTable( - name: "AbpEntityPropertyChanges"); - - migrationBuilder.DropTable( - name: "AbpLinkUsers"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnitRoles"); - - migrationBuilder.DropTable( - name: "AbpPermissionGrants"); - - migrationBuilder.DropTable( - name: "AbpRoleClaims"); - - migrationBuilder.DropTable( - name: "AbpSecurityLogs"); - - migrationBuilder.DropTable( - name: "AbpSettings"); - - migrationBuilder.DropTable( - name: "AbpUserClaims"); - - migrationBuilder.DropTable( - name: "AbpUserLogins"); - - migrationBuilder.DropTable( - name: "AbpUserOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpUserRoles"); - - migrationBuilder.DropTable( - name: "AbpUserTokens"); - - migrationBuilder.DropTable( - name: "EhEventRegistrations"); - - migrationBuilder.DropTable( - name: "EhOrganizationMemberships"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResourceSecrets"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopeProperties"); - - 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: "IdentityServerIdentityResourceClaims"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResourceProperties"); - - migrationBuilder.DropTable( - name: "IdentityServerPersistedGrants"); - - migrationBuilder.DropTable( - name: "AbpBlobContainers"); - - migrationBuilder.DropTable( - name: "AbpEntityChanges"); - - migrationBuilder.DropTable( - name: "AbpOrganizationUnits"); - - migrationBuilder.DropTable( - name: "AbpRoles"); - - migrationBuilder.DropTable( - name: "EhEvents"); - - migrationBuilder.DropTable( - name: "IdentityServerApiResources"); - - migrationBuilder.DropTable( - name: "IdentityServerApiScopes"); - - migrationBuilder.DropTable( - name: "IdentityServerClients"); - - migrationBuilder.DropTable( - name: "IdentityServerIdentityResources"); - - migrationBuilder.DropTable( - name: "AbpAuditLogs"); - - migrationBuilder.DropTable( - name: "EhCountries"); - - migrationBuilder.DropTable( - name: "EhOrganizations"); - - migrationBuilder.DropTable( - name: "AbpUsers"); - } - } -} +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace EventHub.Migrations +{ + public partial class Initial : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpAuditLogs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uuid", nullable: true), + TenantName = table.Column(type: "text", nullable: true), + ImpersonatorUserId = table.Column(type: "uuid", nullable: true), + ImpersonatorTenantId = table.Column(type: "uuid", nullable: true), + ExecutionTime = table.Column(type: "timestamp without time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true), + Comments = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "integer", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpBackgroundJobs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + JobName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + JobArgs = table.Column(type: "character varying(1048576)", maxLength: 1048576, nullable: false), + TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + NextTryTime = table.Column(type: "timestamp without time zone", nullable: false), + LastTryTime = table.Column(type: "timestamp without time zone", nullable: true), + IsAbandoned = table.Column(type: "boolean", nullable: false, defaultValue: false), + Priority = table.Column(type: "smallint", nullable: false, defaultValue: (byte)15), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpBlobContainers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + Regex = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + SourceUserId = table.Column(type: "uuid", nullable: false), + SourceTenantId = table.Column(type: "uuid", nullable: true), + TargetUserId = table.Column(type: "uuid", nullable: false), + TargetTenantId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ParentId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + IsPublic = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSettings", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSettings", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "boolean", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + TwoFactorEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "timestamp with time zone", nullable: true), + LockoutEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "integer", nullable: false, defaultValue: 0), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "EhCountries", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_EhCountries", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResources", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "boolean", nullable: false), + AllowedAccessTokenSigningAlgorithms = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopes", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Enabled = table.Column(type: "boolean", nullable: false), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Required = table.Column(type: "boolean", nullable: false), + Emphasize = table.Column(type: "boolean", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClients", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + ClientUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + LogoUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + Enabled = table.Column(type: "boolean", nullable: false), + ProtocolType = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + RequireClientSecret = table.Column(type: "boolean", nullable: false), + RequireConsent = table.Column(type: "boolean", nullable: false), + AllowRememberConsent = table.Column(type: "boolean", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "boolean", nullable: false), + RequirePkce = table.Column(type: "boolean", nullable: false), + AllowPlainTextPkce = table.Column(type: "boolean", nullable: false), + RequireRequestObject = table.Column(type: "boolean", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "boolean", nullable: false), + FrontChannelLogoutUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + FrontChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false), + BackChannelLogoutUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + BackChannelLogoutSessionRequired = table.Column(type: "boolean", nullable: false), + AllowOfflineAccess = table.Column(type: "boolean", nullable: false), + IdentityTokenLifetime = table.Column(type: "integer", nullable: false), + AllowedIdentityTokenSigningAlgorithms = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + AccessTokenLifetime = table.Column(type: "integer", nullable: false), + AuthorizationCodeLifetime = table.Column(type: "integer", nullable: false), + ConsentLifetime = table.Column(type: "integer", nullable: true), + AbsoluteRefreshTokenLifetime = table.Column(type: "integer", nullable: false), + SlidingRefreshTokenLifetime = table.Column(type: "integer", nullable: false), + RefreshTokenUsage = table.Column(type: "integer", nullable: false), + UpdateAccessTokenClaimsOnRefresh = table.Column(type: "boolean", nullable: false), + RefreshTokenExpiration = table.Column(type: "integer", nullable: false), + AccessTokenType = table.Column(type: "integer", nullable: false), + EnableLocalLogin = table.Column(type: "boolean", nullable: false), + IncludeJwtId = table.Column(type: "boolean", nullable: false), + AlwaysSendClientClaims = table.Column(type: "boolean", nullable: false), + ClientClaimsPrefix = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + PairWiseSubjectSalt = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + UserSsoLifetime = table.Column(type: "integer", nullable: true), + UserCodeType = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + DeviceCodeLifetime = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClients", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerDeviceFlowCodes", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DeviceCode = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + UserCode = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + SubjectId = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Expiration = table.Column(type: "timestamp without time zone", nullable: false), + Data = table.Column(type: "character varying(50000)", maxLength: 50000, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResources", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + DisplayName = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Enabled = table.Column(type: "boolean", nullable: false), + Required = table.Column(type: "boolean", nullable: false), + Emphasize = table.Column(type: "boolean", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerPersistedGrants", + columns: table => new + { + Key = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + Type = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + SubjectId = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + SessionId = table.Column(type: "character varying(100)", maxLength: 100, nullable: true), + ClientId = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + Description = table.Column(type: "character varying(200)", maxLength: 200, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + Expiration = table.Column(type: "timestamp without time zone", nullable: true), + ConsumedTime = table.Column(type: "timestamp without time zone", nullable: true), + Data = table.Column(type: "character varying(50000)", maxLength: 50000, nullable: false), + Id = table.Column(type: "uuid", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); + }); + + migrationBuilder.CreateTable( + name: "AbpAuditLogActions", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + AuditLogId = table.Column(type: "uuid", nullable: false), + ServiceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "timestamp without time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", 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(type: "uuid", nullable: false), + AuditLogId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ChangeTime = table.Column(type: "timestamp without time zone", nullable: false), + ChangeType = table.Column(type: "smallint", nullable: false), + EntityTenantId = table.Column(type: "uuid", nullable: true), + EntityId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + EntityTypeFullName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", 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: "AbpBlobs", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + ContainerId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Content = table.Column(type: "bytea", maxLength: 2147483647, nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpBlobs", x => x.Id); + table.ForeignKey( + name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", + column: x => x.ContainerId, + principalTable: "AbpBlobContainers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~", + 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: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) + }, + 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(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) + }, + 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(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ProviderKey = table.Column(type: "character varying(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "character varying(128)", 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: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~", + 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.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", 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(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Value = table.Column(type: "text", 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: "EhOrganizations", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OwnerUserId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: false), + Website = table.Column(type: "text", nullable: true), + TwitterUsername = table.Column(type: "text", nullable: true), + GitHubUsername = table.Column(type: "text", nullable: true), + FacebookUsername = table.Column(type: "text", nullable: true), + InstagramUsername = table.Column(type: "text", nullable: true), + MediumUsername = table.Column(type: "text", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EhOrganizations", x => x.Id); + table.ForeignKey( + name: "FK_EhOrganizations_AbpUsers_OwnerUserId", + column: x => x.OwnerUserId, + principalTable: "AbpUsers", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceClaims", + columns: table => new + { + Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + ApiResourceId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_~", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceProperties", + columns: table => new + { + ApiResourceId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResour~", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceScopes", + columns: table => new + { + ApiResourceId = table.Column(type: "uuid", nullable: false), + Scope = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); + table.ForeignKey( + name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_~", + column: x => x.ApiResourceId, + principalTable: "IdentityServerApiResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiResourceSecrets", + columns: table => new + { + Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), + ApiResourceId = table.Column(type: "uuid", nullable: false), + Description = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "timestamp without time zone", 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: "IdentityServerApiScopeClaims", + columns: table => new + { + Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + ApiScopeId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiSco~", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerApiScopeProperties", + columns: table => new + { + ApiScopeId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Ap~", + column: x => x.ApiScopeId, + principalTable: "IdentityServerApiScopes", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientClaims", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(250)", 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(type: "uuid", nullable: false), + Origin = table.Column(type: "character varying(150)", maxLength: 150, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); + table.ForeignKey( + name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Clien~", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientGrantTypes", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + GrantType = table.Column(type: "character varying(250)", maxLength: 250, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); + table.ForeignKey( + name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_Client~", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientIdPRestrictions", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + Provider = table.Column(type: "character varying(200)", maxLength: 200, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); + table.ForeignKey( + name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_C~", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientPostLogoutRedirectUris", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + PostLogoutRedirectUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); + table.ForeignKey( + name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCl~", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientProperties", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerClientProperties_IdentityServerClients_Client~", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientRedirectUris", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + RedirectUri = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); + table.ForeignKey( + name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clie~", + column: x => x.ClientId, + principalTable: "IdentityServerClients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerClientScopes", + columns: table => new + { + ClientId = table.Column(type: "uuid", nullable: false), + Scope = table.Column(type: "character varying(200)", 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(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), + ClientId = table.Column(type: "uuid", nullable: false), + Description = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "timestamp without time zone", 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: "IdentityServerIdentityResourceClaims", + columns: table => new + { + Type = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + IdentityResourceId = table.Column(type: "uuid", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentity~", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "IdentityServerIdentityResourceProperties", + columns: table => new + { + IdentityResourceId = table.Column(type: "uuid", nullable: false), + Key = table.Column(type: "character varying(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); + table.ForeignKey( + name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIden~", + column: x => x.IdentityResourceId, + principalTable: "IdentityServerIdentityResources", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpEntityPropertyChanges", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityChangeId = table.Column(type: "uuid", nullable: false), + NewValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "character varying(64)", 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.CreateTable( + name: "EhEvents", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OrganizationId = table.Column(type: "uuid", nullable: false), + UrlCode = table.Column(type: "character varying(8)", maxLength: 8, nullable: false), + Url = table.Column(type: "character varying(69)", maxLength: 69, nullable: false), + Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + StartTime = table.Column(type: "timestamp without time zone", nullable: false), + EndTime = table.Column(type: "timestamp without time zone", nullable: false), + Description = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: false), + IsOnline = table.Column(type: "boolean", nullable: false), + OnlineLink = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + CountryId = table.Column(type: "uuid", nullable: true), + CountryName = table.Column(type: "text", nullable: true), + City = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), + Language = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + Capacity = table.Column(type: "integer", nullable: true), + IsRemindingEmailSent = table.Column(type: "boolean", nullable: false), + IsEmailSentToMembers = table.Column(type: "boolean", nullable: false), + TimingChangeCount = table.Column(type: "integer", nullable: false), + IsTimingChangeEmailSent = table.Column(type: "boolean", nullable: false, defaultValue: true), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EhEvents", x => x.Id); + table.ForeignKey( + name: "FK_EhEvents_EhCountries_CountryId", + column: x => x.CountryId, + principalTable: "EhCountries", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_EhEvents_EhOrganizations_OrganizationId", + column: x => x.OrganizationId, + principalTable: "EhOrganizations", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "EhOrganizationMemberships", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OrganizationId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EhOrganizationMemberships", x => x.Id); + table.ForeignKey( + name: "FK_EhOrganizationMemberships_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_EhOrganizationMemberships_EhOrganizations_OrganizationId", + column: x => x.OrganizationId, + principalTable: "EhOrganizations", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "EhEventRegistrations", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + EventId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EhEventRegistrations", x => x.Id); + table.ForeignKey( + name: "FK_EhEventRegistrations_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id"); + table.ForeignKey( + name: "FK_EhEventRegistrations_EhEvents_EventId", + column: x => x.EventId, + principalTable: "EhEvents", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_AuditLogId", + table: "AbpAuditLogActions", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~", + table: "AbpAuditLogActions", + columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", + table: "AbpAuditLogs", + columns: new[] { "TenantId", "UserId", "ExecutionTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime", + table: "AbpBackgroundJobs", + columns: new[] { "IsAbandoned", "NextTryTime" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobContainers_TenantId_Name", + table: "AbpBlobContainers", + columns: new[] { "TenantId", "Name" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_ContainerId", + table: "AbpBlobs", + column: "ContainerId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpBlobs_TenantId_ContainerId_Name", + table: "AbpBlobs", + columns: new[] { "TenantId", "ContainerId", "Name" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_AuditLogId", + table: "AbpEntityChanges", + column: "AuditLogId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", + table: "AbpEntityChanges", + columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpEntityPropertyChanges_EntityChangeId", + table: "AbpEntityPropertyChanges", + column: "EntityChangeId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSettings_Name_ProviderName_ProviderKey", + table: "AbpSettings", + columns: new[] { "Name", "ProviderName", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + + migrationBuilder.CreateIndex( + name: "IX_EhCountries_Name", + table: "EhCountries", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_EhEventRegistrations_EventId_UserId", + table: "EhEventRegistrations", + columns: new[] { "EventId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_EhEventRegistrations_UserId", + table: "EhEventRegistrations", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_EhEvents_CountryId", + table: "EhEvents", + column: "CountryId"); + + migrationBuilder.CreateIndex( + name: "IX_EhEvents_IsEmailSentToMembers", + table: "EhEvents", + column: "IsEmailSentToMembers"); + + migrationBuilder.CreateIndex( + name: "IX_EhEvents_IsRemindingEmailSent_StartTime", + table: "EhEvents", + columns: new[] { "IsRemindingEmailSent", "StartTime" }); + + migrationBuilder.CreateIndex( + name: "IX_EhEvents_OrganizationId_StartTime", + table: "EhEvents", + columns: new[] { "OrganizationId", "StartTime" }); + + migrationBuilder.CreateIndex( + name: "IX_EhEvents_StartTime", + table: "EhEvents", + column: "StartTime"); + + migrationBuilder.CreateIndex( + name: "IX_EhEvents_UrlCode", + table: "EhEvents", + column: "UrlCode"); + + migrationBuilder.CreateIndex( + name: "IX_EhOrganizationMemberships_OrganizationId_UserId", + table: "EhOrganizationMemberships", + columns: new[] { "OrganizationId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_EhOrganizationMemberships_UserId", + table: "EhOrganizationMemberships", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_EhOrganizations_DisplayName", + table: "EhOrganizations", + column: "DisplayName"); + + migrationBuilder.CreateIndex( + name: "IX_EhOrganizations_Name", + table: "EhOrganizations", + column: "Name"); + + migrationBuilder.CreateIndex( + name: "IX_EhOrganizations_OwnerUserId", + table: "EhOrganizations", + column: "OwnerUserId"); + + 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"); + + 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" }); + + migrationBuilder.CreateIndex( + name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", + table: "IdentityServerPersistedGrants", + columns: new[] { "SubjectId", "SessionId", "Type" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpAuditLogActions"); + + migrationBuilder.DropTable( + name: "AbpBackgroundJobs"); + + migrationBuilder.DropTable( + name: "AbpBlobs"); + + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpEntityPropertyChanges"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSettings"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "EhEventRegistrations"); + + migrationBuilder.DropTable( + name: "EhOrganizationMemberships"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceScopes"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResourceSecrets"); + + migrationBuilder.DropTable( + name: "IdentityServerApiScopeClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerApiScopeProperties"); + + 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: "IdentityServerIdentityResourceClaims"); + + migrationBuilder.DropTable( + name: "IdentityServerIdentityResourceProperties"); + + migrationBuilder.DropTable( + name: "IdentityServerPersistedGrants"); + + migrationBuilder.DropTable( + name: "AbpBlobContainers"); + + migrationBuilder.DropTable( + name: "AbpEntityChanges"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "EhEvents"); + + migrationBuilder.DropTable( + name: "IdentityServerApiResources"); + + migrationBuilder.DropTable( + name: "IdentityServerApiScopes"); + + migrationBuilder.DropTable( + name: "IdentityServerClients"); + + migrationBuilder.DropTable( + name: "IdentityServerIdentityResources"); + + migrationBuilder.DropTable( + name: "AbpAuditLogs"); + + migrationBuilder.DropTable( + name: "EhCountries"); + + migrationBuilder.DropTable( + name: "EhOrganizations"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + } + } +} diff --git a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs b/src/EventHub.EntityFrameworkCore/Migrations/EventHubDbContextModelSnapshot.cs similarity index 99% rename from src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs rename to src/EventHub.EntityFrameworkCore/Migrations/EventHubDbContextModelSnapshot.cs index e2f1ba6..4ea50df 100644 --- a/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs +++ b/src/EventHub.EntityFrameworkCore/Migrations/EventHubDbContextModelSnapshot.cs @@ -9,8 +9,8 @@ using Volo.Abp.EntityFrameworkCore; namespace EventHub.Migrations { - [DbContext(typeof(EventHubMigrationsDbContext))] - partial class EventHubMigrationsDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(EventHubDbContext))] + partial class EventHubDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { @@ -24,7 +24,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Countries.Country", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Name") @@ -42,7 +41,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Events.Event", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Capacity") @@ -172,7 +170,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -211,7 +208,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -250,7 +246,6 @@ namespace EventHub.Migrations modelBuilder.Entity("EventHub.Organizations.Organization", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -726,7 +721,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -773,7 +767,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("SourceTenantId") @@ -799,7 +792,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") @@ -876,7 +868,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Action") @@ -951,7 +942,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AccessFailedCount") @@ -1231,7 +1221,6 @@ namespace EventHub.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Code") diff --git a/src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj b/src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj index 68fab67..01e62db 100644 --- a/src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj +++ b/src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj @@ -25,7 +25,7 @@ - + diff --git a/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs b/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs index 8160b12..65b752f 100644 --- a/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs +++ b/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs @@ -33,7 +33,7 @@ namespace EventHub [DependsOn( typeof(EventHubApplicationModule), typeof(EventHubHttpApiModule), - typeof(EventHubEntityFrameworkCoreDbMigrationsModule), + typeof(EventHubEntityFrameworkCoreModule), typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreSerilogModule), diff --git a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj index af05e89..74d9ddd 100644 --- a/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj +++ b/src/EventHub.IdentityServer/EventHub.IdentityServer.csproj @@ -45,7 +45,10 @@ - + + + + diff --git a/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs b/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs index 2f91909..08898db 100644 --- a/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs +++ b/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs @@ -39,7 +39,7 @@ namespace EventHub typeof(AbpAccountWebIdentityServerModule), typeof(AbpAccountApplicationModule), typeof(EventHubWebThemeModule), - typeof(EventHubEntityFrameworkCoreDbMigrationsModule), + typeof(EventHubEntityFrameworkCoreModule), typeof(AbpAspNetCoreSerilogModule) )] public class EventHubIdentityServerModule : AbpModule diff --git a/test/EventHub.EntityFrameworkCore.Tests/EntityFrameworkCore/EventHubEntityFrameworkCoreTestModule.cs b/test/EventHub.EntityFrameworkCore.Tests/EntityFrameworkCore/EventHubEntityFrameworkCoreTestModule.cs index 79b851b..d1d6dfd 100644 --- a/test/EventHub.EntityFrameworkCore.Tests/EntityFrameworkCore/EventHubEntityFrameworkCoreTestModule.cs +++ b/test/EventHub.EntityFrameworkCore.Tests/EntityFrameworkCore/EventHubEntityFrameworkCoreTestModule.cs @@ -11,7 +11,7 @@ using Volo.Abp.Modularity; namespace EventHub.EntityFrameworkCore { [DependsOn( - typeof(EventHubEntityFrameworkCoreDbMigrationsModule), + typeof(EventHubEntityFrameworkCoreModule), typeof(EventHubTestBaseModule), typeof(AbpEntityFrameworkCoreSqliteModule) )] @@ -47,11 +47,11 @@ namespace EventHub.EntityFrameworkCore var connection = new SqliteConnection("Data Source=:memory:"); connection.Open(); - var options = new DbContextOptionsBuilder() + var options = new DbContextOptionsBuilder() .UseSqlite(connection) .Options; - using (var context = new EventHubMigrationsDbContext(options)) + using (var context = new EventHubDbContext(options)) { context.GetService().CreateTables(); } diff --git a/test/EventHub.EntityFrameworkCore.Tests/EventHub.EntityFrameworkCore.Tests.csproj b/test/EventHub.EntityFrameworkCore.Tests/EventHub.EntityFrameworkCore.Tests.csproj index f7dea80..bf64a42 100644 --- a/test/EventHub.EntityFrameworkCore.Tests/EventHub.EntityFrameworkCore.Tests.csproj +++ b/test/EventHub.EntityFrameworkCore.Tests/EventHub.EntityFrameworkCore.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/test/EventHub.TestBase/EventHubTestBase.cs b/test/EventHub.TestBase/EventHubTestBase.cs index b055851..400468c 100644 --- a/test/EventHub.TestBase/EventHubTestBase.cs +++ b/test/EventHub.TestBase/EventHubTestBase.cs @@ -2,7 +2,6 @@ using System.Threading.Tasks; using EventHub.Events; using EventHub.Organizations; -using EventHub.Users; using Microsoft.Extensions.DependencyInjection; using Volo.Abp; using Volo.Abp.Domain.Entities; @@ -125,20 +124,20 @@ namespace EventHub return @event; } - protected virtual async Task GetUserOrNullAsync(Guid id) + protected virtual async Task GetUserOrNullAsync(Guid id) { - var userRepository = GetRequiredService>(); + var userRepository = GetRequiredService>(); return await WithUnitOfWorkAsync( () => userRepository.FindAsync(id) ); } - protected virtual async Task GetUserAsync(Guid id) + protected virtual async Task GetUserAsync(Guid id) { var user = await GetUserOrNullAsync(id); if (user == null) { - throw new EntityNotFoundException(typeof(AppUser), id); + throw new EntityNotFoundException(typeof(IdentityUser), id); } return user;