Browse Source

Merge branch 'main' into payment-module

pull/69/head
enisn 5 years ago
parent
commit
fa827e9053
  1. 2
      .github/workflows/dotnet.yml
  2. 37
      delete-bin-obj-folders.js
  3. 8
      etc/azure/deploy-to-k8s.yml
  4. 3
      etc/k8s/README.md
  5. 2
      global.json
  6. 6
      src/EventHub.Admin.Application.Contracts/EventHub.Admin.Application.Contracts.csproj
  7. 2
      src/EventHub.Admin.Application.Contracts/Events/EventDetailDto.cs
  8. 3
      src/EventHub.Admin.Application.Contracts/Events/IEventAppService.cs
  9. 3
      src/EventHub.Admin.Application.Contracts/Events/UpdateEventDto.cs
  10. 3
      src/EventHub.Admin.Application.Contracts/Organizations/IOrganizationAppService.cs
  11. 2
      src/EventHub.Admin.Application.Contracts/Organizations/OrganizationProfileDto.cs
  12. 3
      src/EventHub.Admin.Application.Contracts/Organizations/UpdateOrganizationDto.cs
  13. 8
      src/EventHub.Admin.Application/EventHub.Admin.Application.csproj
  14. 6
      src/EventHub.Admin.Application/EventHubApplicationAutoMapperProfile.cs
  15. 33
      src/EventHub.Admin.Application/Events/EventAppService.cs
  16. 32
      src/EventHub.Admin.Application/Organizations/OrganizationAppService.cs
  17. 6
      src/EventHub.Admin.HttpApi.Client/EventHub.Admin.HttpApi.Client.csproj
  18. 20
      src/EventHub.Admin.HttpApi.Host/Controllers/Events/EventController.cs
  19. 23
      src/EventHub.Admin.HttpApi.Host/Controllers/Organizations/OrganizationController.cs
  20. 4
      src/EventHub.Admin.HttpApi.Host/Dockerfile
  21. 18
      src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj
  22. 21
      src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs
  23. 8
      src/EventHub.Admin.HttpApi/EventHub.Admin.HttpApi.csproj
  24. 5
      src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor
  25. 2
      src/EventHub.Admin.Web/Dockerfile
  26. 19
      src/EventHub.Admin.Web/EventHub.Admin.Web.csproj
  27. 3
      src/EventHub.Admin.Web/Pages/AttendeeDetail.razor
  28. 12
      src/EventHub.Admin.Web/Pages/EventManagement.razor
  29. 65
      src/EventHub.Admin.Web/Pages/EventManagement.razor.cs
  30. 14
      src/EventHub.Admin.Web/Pages/OrganizationManagement.razor
  31. 57
      src/EventHub.Admin.Web/Pages/OrganizationManagement.razor.cs
  32. 1
      src/EventHub.Admin.Web/Pages/OrganizationMembershipManagement.razor
  33. BIN
      src/EventHub.Admin.Web/wwwroot/assets/eh-event.png
  34. BIN
      src/EventHub.Admin.Web/wwwroot/assets/eh-organization.png
  35. 18
      src/EventHub.Admin.Web/wwwroot/global.css
  36. 792
      src/EventHub.Admin.Web/wwwroot/global.js
  37. 4
      src/EventHub.Admin.Web/wwwroot/index.html
  38. 5
      src/EventHub.Admin.Web/wwwroot/main.css
  39. 2
      src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj
  40. 3
      src/EventHub.Application.Contracts/Events/CreateEventDto.cs
  41. 4
      src/EventHub.Application.Contracts/Events/EventDetailDto.cs
  42. 2
      src/EventHub.Application.Contracts/Events/EventInListDto.cs
  43. 3
      src/EventHub.Application.Contracts/Events/IEventAppService.cs
  44. 3
      src/EventHub.Application.Contracts/Events/UpdateEventDto.cs
  45. 3
      src/EventHub.Application.Contracts/Organizations/CreateOrganizationDto.cs
  46. 5
      src/EventHub.Application.Contracts/Organizations/IOrganizationAppService.cs
  47. 12
      src/EventHub.Application.Contracts/Organizations/OrganizationDto.cs
  48. 2
      src/EventHub.Application.Contracts/Organizations/OrganizationInListDto.cs
  49. 2
      src/EventHub.Application.Contracts/Organizations/OrganizationProfileDto.cs
  50. 3
      src/EventHub.Application.Contracts/Organizations/UpdateOrganizationDto.cs
  51. 4
      src/EventHub.Application/EventHub.Application.csproj
  52. 3
      src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs
  53. 32
      src/EventHub.Application/Events/EventAppService.cs
  54. 64
      src/EventHub.Application/Organizations/OrganizationAppService.cs
  55. 4
      src/EventHub.BackgroundServices/Dockerfile
  56. 12
      src/EventHub.BackgroundServices/EventHub.BackgroundServices.csproj
  57. 4
      src/EventHub.DbMigrator/Dockerfile
  58. 6
      src/EventHub.DbMigrator/EventHub.DbMigrator.csproj
  59. 16
      src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj
  60. 2
      src/EventHub.Domain.Shared/Organizations/OrganizationContst.cs
  61. 2
      src/EventHub.Domain/Data/IdentityServerDataSeedContributor.cs
  62. 22
      src/EventHub.Domain/EventHub.Domain.csproj
  63. 10
      src/EventHub.Domain/Events/EventUrlHelper.cs
  64. 32
      src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs
  65. 2
      src/EventHub.Domain/Events/Registrations/IEventRegistrationRepository.cs
  66. 2
      src/EventHub.Domain/Organizations/OrganizationManager.cs
  67. 1
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs
  68. 1
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs
  69. 5
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs
  70. 7
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/Events/Registrations/EventRegistrationRepository.cs
  71. 23
      src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj
  72. 2634
      src/EventHub.EntityFrameworkCore/Migrations/20211008110036_Added_IsActive_To_IdentityUser.Designer.cs
  73. 773
      src/EventHub.EntityFrameworkCore/Migrations/20211008110036_Added_IsActive_To_IdentityUser.cs
  74. 200
      src/EventHub.EntityFrameworkCore/Migrations/EventHubDbContextModelSnapshot.cs
  75. 2
      src/EventHub.HttpApi.Client/EventHub.HttpApi.Client.csproj
  76. 28
      src/EventHub.HttpApi.Host/Controllers/Events/EventController.cs
  77. 33
      src/EventHub.HttpApi.Host/Controllers/Organizations/OrganizationController.cs
  78. 4
      src/EventHub.HttpApi.Host/Dockerfile
  79. 19
      src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj
  80. 28
      src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs
  81. BIN
      src/EventHub.HttpApi.Host/Images/eh-event.png
  82. BIN
      src/EventHub.HttpApi.Host/Images/eh-organization.png
  83. 4
      src/EventHub.HttpApi/EventHub.HttpApi.csproj
  84. 4
      src/EventHub.IdentityServer/Dockerfile
  85. 20
      src/EventHub.IdentityServer/EventHub.IdentityServer.csproj
  86. 3
      src/EventHub.IdentityServer/EventHubIdentityServerModule.cs
  87. 35
      src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml
  88. 14
      src/EventHub.IdentityServer/Pages/Account/LoggedOut.css
  89. 2
      src/EventHub.IdentityServer/package.json
  90. 1
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert/sweetalert.min.js
  91. 3122
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js
  92. 2
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  93. 1316
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css
  94. 3120
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js
  95. 1
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css
  96. 1
      src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js
  97. 261
      src/EventHub.IdentityServer/yarn.lock
  98. 8
      src/EventHub.Web.Theme/EventHub.Web.Theme.csproj
  99. 36
      src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml
  100. 18
      src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml

2
.github/workflows/dotnet.yml

@ -24,7 +24,7 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 5.0.x dotnet-version: 6.0.x
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build

37
delete-bin-obj-folders.js

@ -0,0 +1,37 @@
const { resolve } = require("path");
const { readdir, rmdir } = require("fs").promises;
async function* removeFolder(dir) {
await rmdir(dir, { recursive: true });
yield dir;
}
async function* getBinObj(dir) {
const dirents = await readdir(dir, { withFileTypes: true });
for (const dirent of dirents) {
if (!dirent.isDirectory()) continue;
const name = dirent.name;
if (name === "node_modules") continue;
const res = resolve(dir, dirent.name);
if (name === "bin" || name === "obj") {
yield* removeFolder(res);
continue;
}
yield* getBinObj(res);
}
}
(async () => {
console.log("\x1b[36m%s\x1b[0m", "Deleting all BIN and OBJ folders...");
for await (const dir of getBinObj(".")) {
console.log("\x1b[33m%s\x1b[0m", `Removed: ${dir}`);
}
console.log("\x1b[36m%s\x1b[0m", "All BIN and OBJ folders are deleted.");
})();

8
etc/azure/deploy-to-k8s.yml

@ -7,6 +7,14 @@ pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
steps: steps:
- task: UseDotNet@2
displayName: 'Use .NET sdk'
inputs:
packageType: sdk
version: 6.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
- task: PowerShell@2 - task: PowerShell@2
displayName: Build docker images displayName: Build docker images
inputs: inputs:

3
etc/k8s/README.md

@ -6,7 +6,7 @@
### How to run? ### How to run?
* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`): * Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`, in MacOs: `/etc/hosts`):
```` ````
127.0.0.1 eh-st-account 127.0.0.1 eh-st-account
@ -17,6 +17,7 @@
```` ````
* Run `build-images.ps1` in the `scripts` directory. * Run `build-images.ps1` in the `scripts` directory.
* Run `minikube-load-images.ps1` in the `scripts` directory(only for `minikube`).
* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eventhub` namespace. * Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eventhub` namespace.
* *You may wait ~30 seconds on first run for preparing the database*. * *You may wait ~30 seconds on first run for preparing the database*.
* Browse https://eh-st-www and https://eh-st-admin * Browse https://eh-st-www and https://eh-st-admin

2
global.json

@ -1,6 +1,6 @@
{ {
"sdk": { "sdk": {
"version": "5.0.201", "version": "6.0.100-rc.1.21458.32",
"rollForward": "latestFeature" "rollForward": "latestFeature"
} }
} }

6
src/EventHub.Admin.Application.Contracts/EventHub.Admin.Application.Contracts.csproj

@ -12,9 +12,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
src/EventHub.Admin.Application.Contracts/Events/EventDetailDto.cs

@ -13,8 +13,6 @@ namespace EventHub.Admin.Events
public DateTime EndTime { get; set; } public DateTime EndTime { get; set; }
public byte[] CoverImageContent { get; set; }
public bool IsOnline { get; set; } public bool IsOnline { get; set; }
public string OnlineLink { get; set; } public string OnlineLink { get; set; }

3
src/EventHub.Admin.Application.Contracts/Events/IEventAppService.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace EventHub.Admin.Events namespace EventHub.Admin.Events
{ {
@ -16,6 +17,6 @@ namespace EventHub.Admin.Events
Task<List<CountryLookupDto>> GetCountriesLookupAsync(); Task<List<CountryLookupDto>> GetCountriesLookupAsync();
Task<byte[]> GetCoverImageAsync(Guid id); Task<IRemoteStreamContent> GetCoverImageAsync(Guid id);
} }
} }

3
src/EventHub.Admin.Application.Contracts/Events/UpdateEventDto.cs

@ -2,6 +2,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using EventHub.Events; using EventHub.Events;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Content;
namespace EventHub.Admin.Events namespace EventHub.Admin.Events
{ {
@ -24,7 +25,7 @@ namespace EventHub.Admin.Events
public DateTime EndTime { get; set; } public DateTime EndTime { get; set; }
[CanBeNull] [CanBeNull]
public byte[] CoverImageContent { get; set; } public RemoteStreamContent CoverImageStreamContent { get; set; }
public bool IsOnline { get; set; } public bool IsOnline { get; set; }

3
src/EventHub.Admin.Application.Contracts/Organizations/IOrganizationAppService.cs

@ -2,6 +2,7 @@ using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace EventHub.Admin.Organizations namespace EventHub.Admin.Organizations
{ {
@ -16,5 +17,7 @@ namespace EventHub.Admin.Organizations
Task<OrganizationProfileDto> UpdateAsync(Guid id, UpdateOrganizationDto input); Task<OrganizationProfileDto> UpdateAsync(Guid id, UpdateOrganizationDto input);
Task DeleteAsync(Guid id); Task DeleteAsync(Guid id);
Task<IRemoteStreamContent> GetCoverImageAsync(Guid id);
} }
} }

2
src/EventHub.Admin.Application.Contracts/Organizations/OrganizationProfileDto.cs

@ -9,8 +9,6 @@ namespace EventHub.Admin.Organizations
public string DisplayName { get; set; } public string DisplayName { get; set; }
public byte[] ProfilePictureContent { get; set; }
public string OwnerUserName { get; set; } public string OwnerUserName { get; set; }
public string OwnerEmail { get; set; } public string OwnerEmail { get; set; }

3
src/EventHub.Admin.Application.Contracts/Organizations/UpdateOrganizationDto.cs

@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using EventHub.Organizations; using EventHub.Organizations;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Content;
namespace EventHub.Admin.Organizations namespace EventHub.Admin.Organizations
{ {
@ -15,7 +16,7 @@ namespace EventHub.Admin.Organizations
public string Description { get; set; } public string Description { get; set; }
[CanBeNull] [CanBeNull]
public byte[] ProfilePictureContent { get; set; } public IRemoteStreamContent ProfilePictureStreamContent { get; set; }
[CanBeNull] [CanBeNull]
[StringLength(OrganizationConsts.MaxWebsiteLength)] [StringLength(OrganizationConsts.MaxWebsiteLength)]

8
src/EventHub.Admin.Application/EventHub.Admin.Application.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub.Admin</RootNamespace> <RootNamespace>EventHub.Admin</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -13,9 +13,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Account.Application" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.Application" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

6
src/EventHub.Admin.Application/EventHubApplicationAutoMapperProfile.cs

@ -22,13 +22,11 @@ namespace EventHub.Admin
CreateMap<Organization, OrganizationProfileDto>() CreateMap<Organization, OrganizationProfileDto>()
.Ignore(x => x.OwnerUserName) .Ignore(x => x.OwnerUserName)
.Ignore(x => x.OwnerEmail) .Ignore(x => x.OwnerEmail);
.Ignore(x => x.ProfilePictureContent);
CreateMap<OrganizationMemberWithDetails, OrganizationMemberDto>(); CreateMap<OrganizationMemberWithDetails, OrganizationMemberDto>();
CreateMap<Event, EventDetailDto>() CreateMap<Event, EventDetailDto>();
.Ignore(x => x.CoverImageContent);
CreateMap<Country, CountryLookupDto>(); CreateMap<Country, CountryLookupDto>();

33
src/EventHub.Admin.Application/Events/EventAppService.cs

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks; using System.Threading.Tasks;
using EventHub.Admin.Permissions; using EventHub.Admin.Permissions;
using EventHub.Countries; using EventHub.Countries;
@ -9,6 +8,7 @@ using EventHub.Events;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Content;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
namespace EventHub.Admin.Events namespace EventHub.Admin.Events
@ -36,9 +36,7 @@ namespace EventHub.Admin.Events
public async Task<EventDetailDto> GetAsync(Guid id) public async Task<EventDetailDto> GetAsync(Guid id)
{ {
var @event = await _eventRepository.GetAsync(id); var @event = await _eventRepository.GetAsync(id);
var eventDetailDto = ObjectMapper.Map<Event, EventDetailDto>(@event); var eventDetailDto = ObjectMapper.Map<Event, EventDetailDto>(@event);
eventDetailDto.CoverImageContent = await GetCoverImageAsync(id);
return eventDetailDto; return eventDetailDto;
} }
@ -69,16 +67,30 @@ namespace EventHub.Admin.Events
@event.SetTime(input.StartTime, @event.EndTime); @event.SetTime(input.StartTime, @event.EndTime);
await _eventManager.SetCapacityAsync(@event, input.Capacity); await _eventManager.SetCapacityAsync(@event, input.Capacity);
await SetCoverImageAsync(blobName: id.ToString(), input.CoverImageContent); if (input.CoverImageStreamContent != null && input.CoverImageStreamContent.ContentLength > 0)
{
await SetCoverImageAsync(blobName: id.ToString(), input.CoverImageStreamContent);
}
else
{
await DeleteCoverImageAsync(blobName: id.ToString());
}
await _eventRepository.UpdateAsync(@event); await _eventRepository.UpdateAsync(@event);
} }
public async Task<byte[]> GetCoverImageAsync(Guid id) [AllowAnonymous]
public async Task<IRemoteStreamContent> GetCoverImageAsync(Guid id)
{ {
var blobName = id.ToString(); var blobName = id.ToString();
var coverImageStream = await _eventBlobContainer.GetOrNullAsync(blobName);
if (coverImageStream == null)
{
return null;
}
return await _eventBlobContainer.GetAllBytesOrNullAsync(blobName); return new RemoteStreamContent(coverImageStream);
} }
public async Task<List<CountryLookupDto>> GetCountriesLookupAsync() public async Task<List<CountryLookupDto>> GetCountriesLookupAsync()
@ -94,9 +106,14 @@ namespace EventHub.Admin.Events
return ObjectMapper.Map<List<Country>, List<CountryLookupDto>>(countries); return ObjectMapper.Map<List<Country>, List<CountryLookupDto>>(countries);
} }
private async Task SetCoverImageAsync(string blobName, byte[] coverImageContent, bool overrideExisting = true) private async Task SetCoverImageAsync(string blobName, IRemoteStreamContent streamContent, bool overrideExisting = true)
{
await _eventBlobContainer.SaveAsync(blobName, streamContent.GetStream(), overrideExisting);
}
private async Task DeleteCoverImageAsync(string blobName)
{ {
await _eventBlobContainer.SaveAsync(blobName, coverImageContent, overrideExisting); await _eventBlobContainer.DeleteAsync(blobName);
} }
} }
} }

32
src/EventHub.Admin.Application/Organizations/OrganizationAppService.cs

@ -10,8 +10,8 @@ using Microsoft.AspNetCore.Authorization;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Content;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity;
namespace EventHub.Admin.Organizations namespace EventHub.Admin.Organizations
{ {
@ -78,7 +78,7 @@ namespace EventHub.Admin.Organizations
return await CreateOrganizationProfileDto(organization); return await CreateOrganizationProfileDto(organization);
} }
public async Task<OrganizationProfileDto> GetByNameAsync(string name) public async Task<OrganizationProfileDto> GetByNameAsync(string name)
{ {
var organization = await _organizationRepository.FindAsync(x => x.Name.ToLower() == name.ToLower()); var organization = await _organizationRepository.FindAsync(x => x.Name.ToLower() == name.ToLower());
@ -106,13 +106,13 @@ namespace EventHub.Admin.Organizations
organization.InstagramUsername = input.InstagramUsername; organization.InstagramUsername = input.InstagramUsername;
organization.MediumUsername = input.MediumUsername; organization.MediumUsername = input.MediumUsername;
if (input.ProfilePictureContent?.Length > 0) if (input.ProfilePictureStreamContent != null && input.ProfilePictureStreamContent.ContentLength > 0)
{ {
await SaveCoverImageAsync(organization.Id, input.ProfilePictureContent); await SaveCoverImageAsync(organization.Id, input.ProfilePictureStreamContent);
} }
else else
{ {
await DeleteCoverImageAsync(organization.Id); await DeleteCoverImageAsync(blobName: id.ToString());
} }
await _organizationRepository.UpdateAsync(organization); await _organizationRepository.UpdateAsync(organization);
@ -125,7 +125,7 @@ namespace EventHub.Admin.Organizations
{ {
await _organizationRepository.DeleteAsync(id); await _organizationRepository.DeleteAsync(id);
} }
private async Task<OrganizationProfileDto> CreateOrganizationProfileDto(Organization organization) private async Task<OrganizationProfileDto> CreateOrganizationProfileDto(Organization organization)
{ {
var dto = ObjectMapper.Map<Organization, OrganizationProfileDto>(organization); var dto = ObjectMapper.Map<Organization, OrganizationProfileDto>(organization);
@ -134,28 +134,32 @@ namespace EventHub.Admin.Organizations
dto.OwnerUserName = user.UserName; dto.OwnerUserName = user.UserName;
dto.OwnerEmail = user.Email; dto.OwnerEmail = user.Email;
dto.ProfilePictureContent = await GetCoverImageAsync(organization.Id);
return dto; return dto;
} }
private async Task<byte[]> GetCoverImageAsync(Guid id) [AllowAnonymous]
public async Task<IRemoteStreamContent> GetCoverImageAsync(Guid id)
{ {
var blobName = id.ToString(); var blobName = id.ToString();
var coverImageStream = await _organizationBlobContainer.GetOrNullAsync(blobName);
return await _organizationBlobContainer.GetAllBytesOrNullAsync(blobName); if (coverImageStream is null)
{
return null;
}
return new RemoteStreamContent(coverImageStream, blobName);
} }
private async Task SaveCoverImageAsync(Guid id, byte[] coverImageContent) private async Task SaveCoverImageAsync(Guid id, IRemoteStreamContent coverImageContent)
{ {
var blobName = id.ToString(); var blobName = id.ToString();
await _organizationBlobContainer.SaveAsync(blobName, coverImageContent, overrideExisting: true); await _organizationBlobContainer.SaveAsync(blobName, coverImageContent.GetStream(), overrideExisting: true);
} }
private async Task DeleteCoverImageAsync(Guid id) private async Task DeleteCoverImageAsync(string blobName)
{ {
var blobName = id.ToString();
await _organizationBlobContainer.DeleteAsync(blobName); await _organizationBlobContainer.DeleteAsync(blobName);
} }
} }

6
src/EventHub.Admin.HttpApi.Client/EventHub.Admin.HttpApi.Client.csproj

@ -12,9 +12,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

20
src/EventHub.Admin.HttpApi.Host/Controllers/Events/EventController.cs

@ -2,10 +2,12 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using EventHub.Admin.Events; using EventHub.Admin.Events;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
namespace EventHub.Admin.Controllers.Events namespace EventHub.Admin.Controllers.Events
{ {
@ -17,7 +19,7 @@ namespace EventHub.Admin.Controllers.Events
public class EventController : AbpController, IEventAppService public class EventController : AbpController, IEventAppService
{ {
private readonly IEventAppService _eventAppService; private readonly IEventAppService _eventAppService;
public EventController(IEventAppService eventAppService) public EventController(IEventAppService eventAppService)
{ {
_eventAppService = eventAppService; _eventAppService = eventAppService;
@ -36,9 +38,19 @@ namespace EventHub.Admin.Controllers.Events
} }
[HttpGet("cover-image/{id}")] [HttpGet("cover-image/{id}")]
public Task<byte[]> GetCoverImageAsync(Guid id) [AllowAnonymous]
public async Task<IRemoteStreamContent> GetCoverImageAsync(Guid id)
{ {
return _eventAppService.GetCoverImageAsync(id); var remoteStreamContent = await _eventAppService.GetCoverImageAsync(id);
if (remoteStreamContent is null)
{
return null;
}
Response.Headers.Add("Accept-Ranges", "bytes");
Response.ContentType = remoteStreamContent.ContentType;
return remoteStreamContent;
} }
[HttpGet] [HttpGet]
@ -48,7 +60,7 @@ namespace EventHub.Admin.Controllers.Events
} }
[HttpPut] [HttpPut]
public Task UpdateAsync(Guid id, UpdateEventDto input) public Task UpdateAsync(Guid id, [FromForm] UpdateEventDto input)
{ {
return _eventAppService.UpdateAsync(id, input); return _eventAppService.UpdateAsync(id, input);
} }

23
src/EventHub.Admin.HttpApi.Host/Controllers/Organizations/OrganizationController.cs

@ -1,10 +1,12 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using EventHub.Admin.Organizations; using EventHub.Admin.Organizations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
namespace EventHub.Admin.Controllers.Organizations namespace EventHub.Admin.Controllers.Organizations
{ {
@ -16,7 +18,7 @@ namespace EventHub.Admin.Controllers.Organizations
public class OrganizationController : AbpController, IOrganizationAppService public class OrganizationController : AbpController, IOrganizationAppService
{ {
private readonly IOrganizationAppService _organizationAppService; private readonly IOrganizationAppService _organizationAppService;
public OrganizationController(IOrganizationAppService organizationAppService) public OrganizationController(IOrganizationAppService organizationAppService)
{ {
_organizationAppService = organizationAppService; _organizationAppService = organizationAppService;
@ -43,7 +45,7 @@ namespace EventHub.Admin.Controllers.Organizations
} }
[HttpPut] [HttpPut]
public Task<OrganizationProfileDto> UpdateAsync(Guid id, UpdateOrganizationDto input) public Task<OrganizationProfileDto> UpdateAsync(Guid id, [FromForm] UpdateOrganizationDto input)
{ {
return _organizationAppService.UpdateAsync(id, input); return _organizationAppService.UpdateAsync(id, input);
} }
@ -54,5 +56,22 @@ namespace EventHub.Admin.Controllers.Organizations
{ {
return _organizationAppService.DeleteAsync(id); return _organizationAppService.DeleteAsync(id);
} }
[HttpGet]
[AllowAnonymous]
[Route("cover-image/{id}")]
public async Task<IRemoteStreamContent> GetCoverImageAsync(Guid id)
{
var remoteStreamContent = await _organizationAppService.GetCoverImageAsync(id);
if (remoteStreamContent is null)
{
return null;
}
Response.Headers.Add("Accept-Ranges", "bytes");
Response.ContentType = remoteStreamContent.ContentType;
return remoteStreamContent;
}
} }
} }

4
src/EventHub.Admin.HttpApi.Host/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net5.0/publish/ app/ COPY bin/Release/net6.0/publish/ app/
WORKDIR /app WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.Admin.HttpApi.Host.dll"] ENTRYPOINT ["dotnet", "EventHub.Admin.HttpApi.Host.dll"]

18
src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub.Admin</RootNamespace> <RootNamespace>EventHub.Admin</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences> <PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId> <UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
@ -12,14 +12,14 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
<PackageReference Include="Volo.Abp.Autofac" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Swashbuckle" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

21
src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs

@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using EventHub.Admin.Events;
using EventHub.Admin.Organizations;
using EventHub.Admin.Utils; using EventHub.Admin.Utils;
using EventHub.EntityFrameworkCore; using EventHub.EntityFrameworkCore;
using EventHub.Web; using EventHub.Web;
@ -17,6 +19,7 @@ using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using StackExchange.Redis; using StackExchange.Redis;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AspNetCore.Serilog;
@ -59,6 +62,16 @@ namespace EventHub.Admin
ConfigureCookies(context); ConfigureCookies(context);
ConfigureSwaggerServices(context, configuration); ConfigureSwaggerServices(context, configuration);
ConfigureBackgroundJobs(); ConfigureBackgroundJobs();
ConfigureAutoApiControllers();
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UpdateOrganizationDto));
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UpdateEventDto));
});
} }
private void ConfigureBackgroundJobs() private void ConfigureBackgroundJobs()
@ -78,9 +91,9 @@ namespace EventHub.Admin
{ {
var hostingEnvironment = context.Services.GetHostingEnvironment(); var hostingEnvironment = context.Services.GetHostingEnvironment();
if (hostingEnvironment.IsDevelopment()) Configure<AbpVirtualFileSystemOptions>(options =>
{ {
Configure<AbpVirtualFileSystemOptions>(options => if (hostingEnvironment.IsDevelopment())
{ {
options.FileSets.ReplaceEmbeddedByPhysical<EventHubDomainSharedModule>( options.FileSets.ReplaceEmbeddedByPhysical<EventHubDomainSharedModule>(
Path.Combine(hostingEnvironment.ContentRootPath, Path.Combine(hostingEnvironment.ContentRootPath,
@ -94,8 +107,8 @@ namespace EventHub.Admin
options.FileSets.ReplaceEmbeddedByPhysical<EventHubAdminApplicationModule>( options.FileSets.ReplaceEmbeddedByPhysical<EventHubAdminApplicationModule>(
Path.Combine(hostingEnvironment.ContentRootPath, Path.Combine(hostingEnvironment.ContentRootPath,
$"..{Path.DirectorySeparatorChar}EventHub.Admin.Application")); $"..{Path.DirectorySeparatorChar}EventHub.Admin.Application"));
}); }
} });
} }
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)

8
src/EventHub.Admin.HttpApi/EventHub.Admin.HttpApi.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub.Admin</RootNamespace> <RootNamespace>EventHub.Admin</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -12,9 +12,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Account.HttpApi" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.HttpApi" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

5
src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor

@ -3,7 +3,7 @@
@inject IUserAppService UserAppService @inject IUserAppService UserAppService
<Modal @ref="@UserPickerModal" Closing="@ClosingUserPickerModal"> <Modal @ref="@UserPickerModal" Closing="@ClosingUserPickerModal">
<ModalContent Centered="true"> <ModalContent Centered="true" size="@ModalSize.Large">
<ModalHeader> <ModalHeader>
<ModalTitle>@L["AddUser"]</ModalTitle> <ModalTitle>@L["AddUser"]</ModalTitle>
<CloseButton Clicked="CloseUserPickerModalAsync" /> <CloseButton Clicked="CloseUserPickerModalAsync" />
@ -23,8 +23,7 @@
ReadData="OnDataGridReadAsync" ReadData="OnDataGridReadAsync"
TotalItems="TotalCount" TotalItems="TotalCount"
ShowPager="true" ShowPager="true"
PageSize="PageSize" PageSize="PageSize">
Responsive="true">
<DataGridColumns> <DataGridColumns>
<DataGridColumn Sortable="false" TItem="UserDto" Field="@nameof(UserDto.Id)"> <DataGridColumn Sortable="false" TItem="UserDto" Field="@nameof(UserDto.Id)">
<CaptionTemplate> <CaptionTemplate>

2
src/EventHub.Admin.Web/Dockerfile

@ -1,3 +1,3 @@
FROM nginx:latest FROM nginx:latest
COPY ./bin/Release/net5.0/publish/wwwroot/ /usr/share/nginx/html/ COPY ./bin/Release/net6.0/publish/wwwroot/ /usr/share/nginx/html/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf COPY ./nginx.conf /etc/nginx/conf.d/default.conf

19
src/EventHub.Admin.Web/EventHub.Admin.Web.csproj

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData> <BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
</PropertyGroup> </PropertyGroup>
@ -10,16 +10,19 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3.5" /> <PackageReference Include="Blazorise.Bootstrap" Version="0.9.4.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.3.5" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="wwwroot\**\*.*" />
</ItemGroup>
</Project> </Project>

3
src/EventHub.Admin.Web/Pages/AttendeeDetail.razor

@ -28,8 +28,7 @@
ReadData="OnDataGridReadAsync" ReadData="OnDataGridReadAsync"
TotalItems="TotalCount" TotalItems="TotalCount"
ShowPager="true" ShowPager="true"
PageSize="PageSize" PageSize="PageSize">
Responsive="true">
<DataGridColumns> <DataGridColumns>
<DataGridEntityActionsColumn TItem="EventAttendeeDto"> <DataGridEntityActionsColumn TItem="EventAttendeeDto">
<DisplayTemplate> <DisplayTemplate>

12
src/EventHub.Admin.Web/Pages/EventManagement.razor

@ -3,11 +3,14 @@
@using EventHub.Admin.Permissions @using EventHub.Admin.Permissions
@using EventHub.Admin.Events @using EventHub.Admin.Events
@using EventHub.Events @using EventHub.Events
@using EventHub.Web
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.Components.Notifications @using Volo.Abp.AspNetCore.Components.Notifications
@inherits EventHubComponentBase @inherits EventHubComponentBase
@attribute [Authorize(EventHubPermissions.Events.Default)] @attribute [Authorize(EventHubPermissions.Events.Default)]
@inject IEventAppService EventAppService @inject IEventAppService EventAppService
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inject IOptions<EventHubUrlOptions> UrlOptions
<Card> <Card>
<CardHeader> <CardHeader>
@ -61,8 +64,7 @@
ReadData="OnDataGridReadAsync" ReadData="OnDataGridReadAsync"
TotalItems="TotalCount" TotalItems="TotalCount"
ShowPager="true" ShowPager="true"
PageSize="PageSize" PageSize="PageSize">
Responsive="true">
<DataGridColumns> <DataGridColumns>
<DataGridEntityActionsColumn TItem="EventInListDto"> <DataGridEntityActionsColumn TItem="EventInListDto">
<DisplayTemplate> <DisplayTemplate>
@ -263,13 +265,13 @@
<FileEdit MaxMessageSize="@EventConsts.MaxCoverImageFileSize" Filter="@string.Join(", ", EventConsts.AllowedCoverImageExtensions)" Changed="@OnCoverImageFileChanged" AutoReset="true"/> <FileEdit MaxMessageSize="@EventConsts.MaxCoverImageFileSize" Filter="@string.Join(", ", EventConsts.AllowedCoverImageExtensions)" Changed="@OnCoverImageFileChanged" AutoReset="true"/>
</FieldBody> </FieldBody>
<Column ColumnSize="ColumnSize.Is3"> <Column ColumnSize="ColumnSize.Is3">
@if (!string.IsNullOrEmpty(CoverImageUrl)) @if (DisabledCoverImageButton)
{ {
<Button Color="Color.Warning" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button> <Button disabled Color="Color.Secondary" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button>
} }
else else
{ {
<Button disabled Color="Color.Secondary" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button> <Button Color="Color.Warning" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button>
} }
</Column> </Column>
</Field> </Field>

65
src/EventHub.Admin.Web/Pages/EventManagement.razor.cs

@ -10,8 +10,9 @@ using System.ComponentModel;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;
using System.IO; using System.IO;
using System.Globalization; using System.Globalization;
using NUglify.Helpers; using EventHub.Events;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Content;
namespace EventHub.Admin.Web.Pages namespace EventHub.Admin.Web.Pages
{ {
@ -32,6 +33,7 @@ namespace EventHub.Admin.Web.Pages
private IFileEntry FileEntry { get; set; } private IFileEntry FileEntry { get; set; }
private List<CountryLookupDto> Countries { get; set; } private List<CountryLookupDto> Countries { get; set; }
private List<Language> Languages { get; set; } private List<Language> Languages { get; set; }
private bool DisabledCoverImageButton { get; set; }
public EventManagement() public EventManagement()
{ {
@ -92,9 +94,10 @@ namespace EventHub.Admin.Web.Pages
{ {
EditingEventId = input.Id; EditingEventId = input.Id;
Event = await EventAppService.GetAsync(EditingEventId); Event = await EventAppService.GetAsync(EditingEventId);
EditingEvent = ObjectMapper.Map<EventDetailDto, UpdateEventDto>(Event); EditingEvent = ObjectMapper.Map<EventDetailDto, UpdateEventDto>(Event);
FillCoverImageUrl(EditingEvent.CoverImageContent);
FileEntry = new FileEntry();
await SetCoverImageUrlAsync();
EditEventModal.Show(); EditEventModal.Show();
} }
@ -120,6 +123,7 @@ namespace EventHub.Admin.Web.Pages
await GetEventsAsync(); await GetEventsAsync();
CoverImageUrl = string.Empty; CoverImageUrl = string.Empty;
DisabledCoverImageButton = false;
EditEventModal.Hide(); EditEventModal.Hide();
} }
@ -143,18 +147,6 @@ namespace EventHub.Admin.Web.Pages
await GetEventsAsync(); await GetEventsAsync();
} }
private void FillCoverImageUrl(byte[] content)
{
if (content.IsNullOrEmpty())
{
return;
}
var imageBase64Data = Convert.ToBase64String(content);
var imageDataUrl = $"data:image/png;base64,{imageBase64Data}";
CoverImageUrl = imageDataUrl;
}
private async Task OnCoverImageFileChanged(FileChangedEventArgs e) private async Task OnCoverImageFileChanged(FileChangedEventArgs e)
{ {
FileEntry = e.Files.FirstOrDefault(); FileEntry = e.Files.FirstOrDefault();
@ -163,28 +155,55 @@ namespace EventHub.Admin.Web.Pages
return; return;
} }
using (var stream = new MemoryStream()) var stream = new MemoryStream();
{ await FileEntry.WriteToStreamAsync(stream);
await FileEntry.WriteToStreamAsync(stream); stream.Seek(0, SeekOrigin.Begin);
stream.Seek(0, SeekOrigin.Begin); EditingEvent.CoverImageStreamContent = new RemoteStreamContent(stream);
EditingEvent.CoverImageContent = stream.ToArray();
FillCoverImageUrl(EditingEvent.CoverImageContent); void SetCoverImageUrl(string contentType, byte[] content)
await InvokeAsync(StateHasChanged); {
if (content.IsNullOrEmpty())
{
return;
}
contentType = string.IsNullOrWhiteSpace(contentType) ? "image/png" : contentType;
CoverImageUrl = $"data:{contentType};base64,{Convert.ToBase64String(content)}";
DisabledCoverImageButton = false;
} }
SetCoverImageUrl(EditingEvent.CoverImageStreamContent.ContentType, stream.ToArray());
await stream.FlushAsync();
await InvokeAsync(StateHasChanged);
} }
private void OnDeleteCoverImageButtonClicked() private void OnDeleteCoverImageButtonClicked()
{ {
EditingEvent.CoverImageContent = null; EditingEvent.CoverImageStreamContent = null;
FileEntry = new FileEntry(); FileEntry = new FileEntry();
CoverImageUrl = null; CoverImageUrl = null;
DisabledCoverImageButton = true;
} }
private async Task FillCountriesAsync() private async Task FillCountriesAsync()
{ {
Countries = await EventAppService.GetCountriesLookupAsync(); Countries = await EventAppService.GetCountriesLookupAsync();
} }
private async Task SetCoverImageUrlAsync()
{
var imageRemoteStreamContent = await EventAppService.GetCoverImageAsync(id: EditingEventId);
if (imageRemoteStreamContent.ContentLength <= 0)
{
CoverImageUrl = "/assets/eh-event.png";
DisabledCoverImageButton = true;
return;
}
CoverImageUrl = UrlOptions.Value.AdminApi.EnsureEndsWith('/') + "api/eventhub/admin/event/cover-image/" + EditingEventId;
}
private enum EventEditTabs : byte private enum EventEditTabs : byte
{ {

14
src/EventHub.Admin.Web/Pages/OrganizationManagement.razor

@ -4,12 +4,15 @@
@using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Authorization
@using EventHub.Admin.Organizations @using EventHub.Admin.Organizations
@using EventHub.Organizations @using EventHub.Organizations
@using EventHub.Web
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.Components.Notifications @using Volo.Abp.AspNetCore.Components.Notifications
@inherits EventHubComponentBase @inherits EventHubComponentBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@attribute [Authorize(EventHubPermissions.Organizations.Default)] @attribute [Authorize(EventHubPermissions.Organizations.Default)]
@inject IOrganizationAppService OrganizationAppService @inject IOrganizationAppService OrganizationAppService
@inject IUiNotificationService UiNotificationService @inject IUiNotificationService UiNotificationService
@inject IOptions<EventHubUrlOptions> UrlOptions
<Card> <Card>
<CardHeader> <CardHeader>
@ -58,8 +61,7 @@
ReadData="OnDataGridReadAsync" ReadData="OnDataGridReadAsync"
TotalItems="TotalCount" TotalItems="TotalCount"
ShowPager="true" ShowPager="true"
PageSize="PageSize" PageSize="PageSize">
Responsive="true">
<DataGridColumns> <DataGridColumns>
<DataGridEntityActionsColumn TItem="OrganizationInListDto"> <DataGridEntityActionsColumn TItem="OrganizationInListDto">
<DisplayTemplate> <DisplayTemplate>
@ -235,16 +237,16 @@
<Field Horizontal="true"> <Field Horizontal="true">
<FieldLabel ColumnSize="ColumnSize.Is3">@L["ChooseProfileImage"]</FieldLabel> <FieldLabel ColumnSize="ColumnSize.Is3">@L["ChooseProfileImage"]</FieldLabel>
<FieldBody ColumnSize="ColumnSize.Is6"> <FieldBody ColumnSize="ColumnSize.Is6">
<FileEdit MaxMessageSize="@OrganizationConsts.MaxProfilePictureFileSize" Filter=".jpg, .png" Changed="@OnProfileImageFileChanged" Progressed="@OnProgressedForProfileImage" AutoReset="true"/> <FileEdit MaxMessageSize="@OrganizationConsts.MaxProfilePictureFileSize" Filter="@string.Join(", ", OrganizationConsts.AllowedProfilePictureExtensions)" Changed="@OnProfileImageFileChanged" Progressed="@OnProgressedForProfileImage" AutoReset="true"/>
</FieldBody> </FieldBody>
<Column ColumnSize="ColumnSize.Is3"> <Column ColumnSize="ColumnSize.Is3">
@if (!ProfileImageUrl.IsNullOrWhiteSpace()) @if (DisabledProfileImageButton)
{ {
<Button Color="Color.Warning" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button> <Button disabled Color="Color.Secondary" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button>
} }
else else
{ {
<Button disabled Color="Color.Secondary" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button> <Button Color="Color.Warning" Clicked="@OnDeleteCoverImageButtonClicked">@L["DeleteCoverImage"]</Button>
} }
</Column> </Column>
</Field> </Field>

57
src/EventHub.Admin.Web/Pages/OrganizationManagement.razor.cs

@ -9,6 +9,7 @@ using Blazorise.DataGrid;
using EventHub.Admin.Organizations; using EventHub.Admin.Organizations;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Content;
namespace EventHub.Admin.Web.Pages namespace EventHub.Admin.Web.Pages
{ {
@ -30,6 +31,7 @@ namespace EventHub.Admin.Web.Pages
private IFileEntry FileEntry { get; set; } private IFileEntry FileEntry { get; set; }
private bool IsLoadingProfileImage { get; set; } private bool IsLoadingProfileImage { get; set; }
private string SelectedTabInEditModal { get; set; } private string SelectedTabInEditModal { get; set; }
private bool DisabledProfileImageButton { get; set; }
public OrganizationManagement() public OrganizationManagement()
{ {
@ -73,7 +75,9 @@ namespace EventHub.Admin.Web.Pages
{ {
EditingOrganizationId = input.Id; EditingOrganizationId = input.Id;
Organization = await OrganizationAppService.GetAsync(EditingOrganizationId); Organization = await OrganizationAppService.GetAsync(EditingOrganizationId);
FillProfileImageUrl(Organization.ProfilePictureContent);
FileEntry = new FileEntry();
await SetProfileImageUrlAsync();
EditingOrganization = ObjectMapper.Map<OrganizationProfileDto, UpdateOrganizationDto>(Organization); EditingOrganization = ObjectMapper.Map<OrganizationProfileDto, UpdateOrganizationDto>(Organization);
EditOrganizationModal.Show(); EditOrganizationModal.Show();
@ -84,13 +88,17 @@ namespace EventHub.Admin.Web.Pages
await OrganizationAppService.UpdateAsync(EditingOrganizationId, EditingOrganization); await OrganizationAppService.UpdateAsync(EditingOrganizationId, EditingOrganization);
await GetOrganizationsAsync(); await GetOrganizationsAsync();
EditOrganizationModal.Hide(); EditOrganizationModal.Hide();
ProfileImageUrl = null;
DisabledProfileImageButton = false;
} }
private void OnDeleteCoverImageButtonClicked() private void OnDeleteCoverImageButtonClicked()
{ {
EditingOrganization.ProfilePictureContent = null; EditingOrganization.ProfilePictureStreamContent = null;
FileEntry = new FileEntry(); FileEntry = new FileEntry();
ProfileImageUrl = null; ProfileImageUrl = null;
DisabledProfileImageButton = true;
IsLoadingProfileImage = false; IsLoadingProfileImage = false;
} }
@ -110,25 +118,26 @@ namespace EventHub.Admin.Web.Pages
IsLoadingProfileImage = true; IsLoadingProfileImage = true;
using (var stream = new MemoryStream()) var stream = new MemoryStream();
{ await FileEntry.WriteToStreamAsync(stream);
await FileEntry.WriteToStreamAsync(stream); stream.Seek(0, SeekOrigin.Begin);
EditingOrganization.ProfilePictureStreamContent = new RemoteStreamContent(stream);
stream.Seek(0, SeekOrigin.Begin);
EditingOrganization.ProfilePictureContent = stream.ToArray();
FillProfileImageUrl(EditingOrganization.ProfilePictureContent);
await InvokeAsync(StateHasChanged);
}
}
private void FillProfileImageUrl(byte[] content) void SetProfileImageUrl(string contentType, byte[] content)
{
if (content != null)
{ {
var imageBase64Data = Convert.ToBase64String(content); if (content != null)
var imageDataUrl = $"data:image/png;base64,{imageBase64Data}"; {
ProfileImageUrl = imageDataUrl; contentType = string.IsNullOrWhiteSpace(contentType) ? "image/png" : contentType;
var imageDataUrl = $"data:{contentType};base64,{Convert.ToBase64String(content)}";
ProfileImageUrl = imageDataUrl;
DisabledProfileImageButton = false;
}
} }
SetProfileImageUrl(EditingOrganization.ProfilePictureStreamContent.ContentType, stream.ToArray());
await stream.FlushAsync();
await InvokeAsync(StateHasChanged);
} }
private void OnProgressedForProfileImage(FileProgressedEventArgs e) private void OnProgressedForProfileImage(FileProgressedEventArgs e)
@ -157,6 +166,18 @@ namespace EventHub.Admin.Web.Pages
await GetOrganizationsAsync(); await GetOrganizationsAsync();
} }
} }
private async Task SetProfileImageUrlAsync()
{
var imageRemoteStreamContent = await OrganizationAppService.GetCoverImageAsync(id: EditingOrganizationId);
if (imageRemoteStreamContent.ContentLength <= 0)
{
ProfileImageUrl = "assets/eh-organization.png";
DisabledProfileImageButton = true;
return;
}
ProfileImageUrl = UrlOptions.Value.AdminApi.EnsureEndsWith('/') + "api/eventhub/admin/organization/cover-image/" + EditingOrganizationId;
}
} }
public enum TabContentInEditModal : byte public enum TabContentInEditModal : byte

1
src/EventHub.Admin.Web/Pages/OrganizationMembershipManagement.razor

@ -46,7 +46,6 @@
TotalItems="TotalCount" TotalItems="TotalCount"
ShowPager="true" ShowPager="true"
PageSize="PageSize" PageSize="PageSize"
Responsive="true"
Sortable="false"> Sortable="false">
<DataGridColumns> <DataGridColumns>
<DataGridColumn TItem="OrganizationMemberDto" <DataGridColumn TItem="OrganizationMemberDto"

BIN
src/EventHub.Admin.Web/wwwroot/assets/eh-event.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
src/EventHub.Admin.Web/wwwroot/assets/eh-organization.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 KiB

18
src/EventHub.Admin.Web/wwwroot/global.css

File diff suppressed because one or more lines are too long

792
src/EventHub.Admin.Web/wwwroot/global.js

File diff suppressed because one or more lines are too long

4
src/EventHub.Admin.Web/wwwroot/index.html

@ -8,7 +8,7 @@
<base href="/" /> <base href="/" />
<!--ABP:Styles--> <!--ABP:Styles-->
<link href="global.css?_v=637453952859170535" rel="stylesheet"/> <link href="global.css?_v=637693024777665879" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/> <link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles--> <!--/ABP:Styles-->
</head> </head>
@ -22,7 +22,7 @@
</div> </div>
<!--ABP:Scripts--> <!--ABP:Scripts-->
<script src="global.js?_v=637453952867128601"></script> <script src="global.js?_v=637693024783699144"></script>
<!--/ABP:Scripts--> <!--/ABP:Scripts-->
</body> </body>

5
src/EventHub.Admin.Web/wwwroot/main.css

@ -1,4 +1,5 @@
.spinner { /* Global styles for the EventHub application */
.spinner {
width: 40px; width: 40px;
height: 40px; height: 40px;
display: block; display: block;
@ -45,4 +46,4 @@
transform: scale(1.0); transform: scale(1.0);
-webkit-transform: scale(1.0); -webkit-transform: scale(1.0);
} }
} }

2
src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj

@ -12,7 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

3
src/EventHub.Application.Contracts/Events/CreateEventDto.cs

@ -1,6 +1,7 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Content;
namespace EventHub.Events namespace EventHub.Events
{ {
@ -24,7 +25,7 @@ namespace EventHub.Events
public string Description { get; set; } public string Description { get; set; }
[CanBeNull] [CanBeNull]
public byte[] CoverImageContent { get; set; } public IRemoteStreamContent CoverImageStreamContent { get; set; }
public bool IsOnline { get; set; } public bool IsOnline { get; set; }

4
src/EventHub.Application.Contracts/Events/EventDetailDto.cs

@ -22,9 +22,7 @@ namespace EventHub.Events
public DateTime StartTime { get; set; } public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; } public DateTime EndTime { get; set; }
public byte[] CoverImageContent { get; set; }
public bool IsOnline { get; set; } public bool IsOnline { get; set; }
public string OnlineLink { get; set; } public string OnlineLink { get; set; }

2
src/EventHub.Application.Contracts/Events/EventInListDto.cs

@ -16,8 +16,6 @@ namespace EventHub.Events
public DateTime StartTime { get; set; } public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; } public DateTime EndTime { get; set; }
public byte[] CoverImageContent { get; set; }
public bool IsOnline { get; set; } public bool IsOnline { get; set; }

3
src/EventHub.Application.Contracts/Events/IEventAppService.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace EventHub.Events namespace EventHub.Events
{ {
@ -22,6 +23,6 @@ namespace EventHub.Events
Task UpdateAsync(Guid id, UpdateEventDto input); Task UpdateAsync(Guid id, UpdateEventDto input);
Task<byte[]> GetCoverImageAsync(Guid id); Task<IRemoteStreamContent> GetCoverImageAsync(Guid id);
} }
} }

3
src/EventHub.Application.Contracts/Events/UpdateEventDto.cs

@ -1,6 +1,7 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Content;
namespace EventHub.Events namespace EventHub.Events
{ {
@ -15,7 +16,7 @@ namespace EventHub.Events
public string Description { get; set; } public string Description { get; set; }
[CanBeNull] [CanBeNull]
public byte[] CoverImageContent { get; set; } public IRemoteStreamContent CoverImageStreamContent { get; set; }
[Required] [Required]
[DataType(DataType.DateTime)] [DataType(DataType.DateTime)]

3
src/EventHub.Application.Contracts/Organizations/CreateOrganizationDto.cs

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Content;
namespace EventHub.Organizations namespace EventHub.Organizations
{ {
@ -18,7 +19,7 @@ namespace EventHub.Organizations
public string Description { get; set; } public string Description { get; set; }
[CanBeNull] [CanBeNull]
public byte[] ProfilePictureContent { get; set; } public RemoteStreamContent ProfilePictureStreamContent { get; set; }
[StringLength(OrganizationConsts.MaxWebsiteLength)] [StringLength(OrganizationConsts.MaxWebsiteLength)]
public string Website { get; set; } public string Website { get; set; }

5
src/EventHub.Application.Contracts/Organizations/IOrganizationAppService.cs

@ -2,12 +2,13 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace EventHub.Organizations namespace EventHub.Organizations
{ {
public interface IOrganizationAppService : IApplicationService public interface IOrganizationAppService : IApplicationService
{ {
Task CreateAsync(CreateOrganizationDto input); Task<OrganizationDto> CreateAsync(CreateOrganizationDto input);
Task<PagedResultDto<OrganizationInListDto>> GetListAsync(OrganizationListFilterDto input); Task<PagedResultDto<OrganizationInListDto>> GetListAsync(OrganizationListFilterDto input);
@ -18,5 +19,7 @@ namespace EventHub.Organizations
Task<bool> IsOrganizationOwnerAsync(Guid organizationId); Task<bool> IsOrganizationOwnerAsync(Guid organizationId);
Task UpdateAsync(Guid id, UpdateOrganizationDto input); Task UpdateAsync(Guid id, UpdateOrganizationDto input);
Task<IRemoteStreamContent> GetProfilePictureAsync(Guid id);
} }
} }

12
src/EventHub.Application.Contracts/Organizations/OrganizationDto.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Application.Dtos;
namespace EventHub.Organizations
{
public class OrganizationDto : EntityDto<Guid>
{
public string Name { get; set; }
public string DisplayName { get; set; }
}
}

2
src/EventHub.Application.Contracts/Organizations/OrganizationInListDto.cs

@ -10,7 +10,5 @@ namespace EventHub.Organizations
public string DisplayName { get; set; } public string DisplayName { get; set; }
public string Description { get; set; } public string Description { get; set; }
public byte[] ProfilePictureContent { get; set; }
} }
} }

2
src/EventHub.Application.Contracts/Organizations/OrganizationProfileDto.cs

@ -26,7 +26,5 @@ namespace EventHub.Organizations
public string InstagramUsername { get; set; } public string InstagramUsername { get; set; }
public string MediumUsername { get; set; } public string MediumUsername { get; set; }
public byte[] ProfilePictureContent { get; set; }
} }
} }

3
src/EventHub.Application.Contracts/Organizations/UpdateOrganizationDto.cs

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using JetBrains.Annotations; using JetBrains.Annotations;
using Volo.Abp.Content;
namespace EventHub.Organizations namespace EventHub.Organizations
{ {
@ -14,7 +15,7 @@ namespace EventHub.Organizations
public string Description { get; set; } public string Description { get; set; }
[CanBeNull] [CanBeNull]
public byte[] ProfilePictureContent { get; set; } public RemoteStreamContent ProfilePictureStreamContent { get; set; }
[CanBeNull] [CanBeNull]
[StringLength(OrganizationConsts.MaxWebsiteLength)] [StringLength(OrganizationConsts.MaxWebsiteLength)]

4
src/EventHub.Application/EventHub.Application.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -13,7 +13,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Ddd.Application" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

3
src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs

@ -17,7 +17,8 @@ namespace EventHub
{ {
CreateMap<Organization, OrganizationInListDto>(); CreateMap<Organization, OrganizationInListDto>();
CreateMap<Organization, OrganizationProfileDto>(); CreateMap<Organization, OrganizationProfileDto>();
CreateMap<Organization, OrganizationDto>();
CreateMap<IdentityUser, OrganizationMemberDto>(); CreateMap<IdentityUser, OrganizationMemberDto>();
CreateMap<Event, EventDto>(); CreateMap<Event, EventDto>();

32
src/EventHub.Application/Events/EventAppService.cs

@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Authorization; using Volo.Abp.Authorization;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Content;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.Users; using Volo.Abp.Users;
@ -73,9 +74,9 @@ namespace EventHub.Events
await _eventManager.SetCapacityAsync(@event, input.Capacity); await _eventManager.SetCapacityAsync(@event, input.Capacity);
if (input.CoverImageContent != null && input.CoverImageContent.Length > 0) if (input.CoverImageStreamContent != null && input.CoverImageStreamContent.ContentLength > 0)
{ {
await SaveCoverImageAsync(@event.Id, input.CoverImageContent); await SaveCoverImageAsync(@event.Id, input.CoverImageStreamContent);
} }
await _eventRepository.InsertAsync(@event); await _eventRepository.InsertAsync(@event);
@ -161,11 +162,6 @@ namespace EventHub.Events
} }
).ToList(); ).ToList();
foreach (var @event in events)
{
@event.CoverImageContent = await GetCoverImageAsync(@event.Id);
}
return new PagedResultDto<EventInListDto>(totalCount, events); return new PagedResultDto<EventInListDto>(totalCount, events);
} }
@ -179,8 +175,7 @@ namespace EventHub.Events
dto.OrganizationId = organization.Id; dto.OrganizationId = organization.Id;
dto.OrganizationName = organization.Name; dto.OrganizationName = organization.Name;
dto.OrganizationDisplayName = organization.DisplayName; dto.OrganizationDisplayName = organization.DisplayName;
dto.CoverImageContent = await GetCoverImageAsync(dto.Id);
var user = await _userRepository.GetAsync(organization.OwnerUserId); var user = await _userRepository.GetAsync(organization.OwnerUserId);
dto.OwnerUserName = user.UserName; dto.OwnerUserName = user.UserName;
dto.OwnerEmail = user.Email; dto.OwnerEmail = user.Email;
@ -254,26 +249,33 @@ namespace EventHub.Events
@event.SetTime(input.StartTime, input.EndTime); @event.SetTime(input.StartTime, input.EndTime);
await _eventManager.SetCapacityAsync(@event, input.Capacity); await _eventManager.SetCapacityAsync(@event, input.Capacity);
if (input.CoverImageContent != null && input.CoverImageContent.Length > 0) if (input.CoverImageStreamContent != null && input.CoverImageStreamContent.ContentLength > 0)
{ {
await SaveCoverImageAsync(@event.Id, input.CoverImageContent); await SaveCoverImageAsync(@event.Id, input.CoverImageStreamContent);
} }
await _eventRepository.UpdateAsync(@event); await _eventRepository.UpdateAsync(@event);
} }
public async Task<byte[]> GetCoverImageAsync(Guid id) public async Task<IRemoteStreamContent> GetCoverImageAsync(Guid id)
{ {
var blobName = id.ToString(); var blobName = id.ToString();
return await _eventBlobContainer.GetAllBytesOrNullAsync(blobName); var coverImageStream = await _eventBlobContainer.GetOrNullAsync(blobName);
if (coverImageStream is null)
{
return null;
}
return new RemoteStreamContent(coverImageStream, blobName);
} }
private async Task SaveCoverImageAsync(Guid id, byte[] coverImageContent) private async Task SaveCoverImageAsync(Guid id, IRemoteStreamContent streamContent)
{ {
var blobName = id.ToString(); var blobName = id.ToString();
await _eventBlobContainer.SaveAsync(blobName, coverImageContent, overrideExisting: true); await _eventBlobContainer.SaveAsync(blobName, streamContent.GetStream(), overrideExisting: true);
} }
} }
} }

64
src/EventHub.Application/Organizations/OrganizationAppService.cs

@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Authorization; using Volo.Abp.Authorization;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Content;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.Users; using Volo.Abp.Users;
@ -37,7 +38,7 @@ namespace EventHub.Organizations
} }
[Authorize] [Authorize]
public async Task CreateAsync(CreateOrganizationDto input) public async Task<OrganizationDto> CreateAsync(CreateOrganizationDto input)
{ {
var organization = await _organizationManager.CreateAsync( var organization = await _organizationManager.CreateAsync(
CurrentUser.GetId(), CurrentUser.GetId(),
@ -52,13 +53,15 @@ namespace EventHub.Organizations
organization.FacebookUsername = input.FacebookUsername; organization.FacebookUsername = input.FacebookUsername;
organization.InstagramUsername = input.InstagramUsername; organization.InstagramUsername = input.InstagramUsername;
organization.MediumUsername = input.MediumUsername; organization.MediumUsername = input.MediumUsername;
await _organizationRepository.InsertAsync(organization, true); await _organizationRepository.InsertAsync(organization, true);
if (input.ProfilePictureContent != null && input.ProfilePictureContent.Length > 0) if (input.ProfilePictureStreamContent != null && input.ProfilePictureStreamContent.ContentLength > 0)
{ {
await SaveProfilePictureAsync(organization.Id, input.ProfilePictureContent); await SaveProfilePictureAsync(organization.Id, input.ProfilePictureStreamContent);
} }
return ObjectMapper.Map<Organization, OrganizationDto>(organization);
} }
public async Task<PagedResultDto<OrganizationInListDto>> GetListAsync(OrganizationListFilterDto input) public async Task<PagedResultDto<OrganizationInListDto>> GetListAsync(OrganizationListFilterDto input)
@ -67,13 +70,13 @@ namespace EventHub.Organizations
var organizationMemberQueryable = await _organizationMembershipsRepository.GetQueryableAsync(); var organizationMemberQueryable = await _organizationMembershipsRepository.GetQueryableAsync();
var query = organizationQueryable; var query = organizationQueryable;
if (input.RegisteredUserId.HasValue) if (input.RegisteredUserId.HasValue)
{ {
var registeredOrganization = organizationMemberQueryable var registeredOrganization = organizationMemberQueryable
.Where(x => x.UserId == input.RegisteredUserId) .Where(x => x.UserId == input.RegisteredUserId)
.Select(x => x.OrganizationId); .Select(x => x.OrganizationId);
var organizationIds = await AsyncExecuter.ToListAsync(registeredOrganization); var organizationIds = await AsyncExecuter.ToListAsync(registeredOrganization);
query = query.Where(x => organizationIds.Contains(x.Id)); query = query.Where(x => organizationIds.Contains(x.Id));
} }
@ -84,11 +87,6 @@ namespace EventHub.Organizations
var organizationDto = ObjectMapper var organizationDto = ObjectMapper
.Map<List<Organization>, List<OrganizationInListDto>>(await AsyncExecuter.ToListAsync(query)); .Map<List<Organization>, List<OrganizationInListDto>>(await AsyncExecuter.ToListAsync(query));
foreach (var organization in organizationDto)
{
organization.ProfilePictureContent = await GetProfilePictureAsync(organization.Id);
}
return new PagedResultDto<OrganizationInListDto>( return new PagedResultDto<OrganizationInListDto>(
totalCount, totalCount,
@ -104,7 +102,6 @@ namespace EventHub.Organizations
var owner = await _userRepository.GetAsync(u => u.Id == organization.OwnerUserId); var owner = await _userRepository.GetAsync(u => u.Id == organization.OwnerUserId);
organizationProfileDto.OwnerUserName = owner.UserName; organizationProfileDto.OwnerUserName = owner.UserName;
organizationProfileDto.OwnerEmail = owner.Email; organizationProfileDto.OwnerEmail = owner.Email;
organizationProfileDto.ProfilePictureContent = await GetProfilePictureAsync(organizationProfileDto.Id);
return organizationProfileDto; return organizationProfileDto;
} }
@ -116,17 +113,13 @@ namespace EventHub.Organizations
var organizationDto = ObjectMapper.Map<List<Organization>, List<OrganizationInListDto>>(organizations); var organizationDto = ObjectMapper.Map<List<Organization>, List<OrganizationInListDto>>(organizations);
foreach (var organization in organizationDto)
{
organization.ProfilePictureContent = await GetProfilePictureAsync(organization.Id);
}
return new ListResultDto<OrganizationInListDto>(organizationDto); return new ListResultDto<OrganizationInListDto>(organizationDto);
} }
public async Task<bool> IsOrganizationOwnerAsync(Guid organizationId) public async Task<bool> IsOrganizationOwnerAsync(Guid organizationId)
{ {
return CurrentUser.Id.HasValue && await _organizationRepository.AnyAsync(x => x.Id == organizationId && x.OwnerUserId == CurrentUser.Id.Value); return CurrentUser.Id.HasValue && await _organizationRepository
.AnyAsync(x => x.Id == organizationId && x.OwnerUserId == CurrentUser.Id.Value);
} }
[Authorize] [Authorize]
@ -148,35 +141,34 @@ namespace EventHub.Organizations
organization.InstagramUsername = input.InstagramUsername; organization.InstagramUsername = input.InstagramUsername;
organization.FacebookUsername = input.FacebookUsername; organization.FacebookUsername = input.FacebookUsername;
organization.MediumUsername = input.MediumUsername; organization.MediumUsername = input.MediumUsername;
if (input.ProfilePictureContent != null && input.ProfilePictureContent.Length > 0) if (input.ProfilePictureStreamContent != null && input.ProfilePictureStreamContent.ContentLength > 0)
{ {
await SaveProfilePictureAsync(organization.Id, input.ProfilePictureContent); await SaveProfilePictureAsync(organization.Id, input.ProfilePictureStreamContent);
} }
await _organizationRepository.UpdateAsync(organization); await _organizationRepository.UpdateAsync(organization);
} }
private async Task SaveProfilePictureAsync(Guid id, byte[] bytes) public async Task<IRemoteStreamContent> GetProfilePictureAsync(Guid id)
{ {
var organization = await _organizationRepository.GetAsync(x => x.Id == id); var blobName = id.ToString();
var pictureContent = await _organizationBlobContainer.GetOrNullAsync(blobName);
if (organization.OwnerUserId != CurrentUser.GetId()) if (pictureContent is null)
{ {
throw new AbpAuthorizationException(EventHubErrorCodes.NotAuthorizedToUpdateOrganizationProfile) return null;
.WithData("Name", organization.DisplayName);
} }
var blobName = id.ToString(); return new RemoteStreamContent(pictureContent, blobName);
await _organizationBlobContainer.SaveAsync(blobName, bytes, overrideExisting: true);
} }
private async Task<byte[]> GetProfilePictureAsync(Guid id) private async Task SaveProfilePictureAsync(Guid id, IRemoteStreamContent streamContent)
{ {
var blobName = id.ToString(); var blobName = id.ToString();
return await _organizationBlobContainer.GetAllBytesOrNullAsync(blobName); await _organizationBlobContainer.SaveAsync(blobName, streamContent.GetStream(), overrideExisting: true);
} }
} }
} }

4
src/EventHub.BackgroundServices/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net5.0/ app/ COPY bin/Release/net6.0/ app/
WORKDIR /app WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.BackgroundServices.dll"] ENTRYPOINT ["dotnet", "EventHub.BackgroundServices.dll"]

12
src/EventHub.BackgroundServices/EventHub.BackgroundServices.csproj

@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
<UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId> <UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup> </PropertyGroup>
@ -14,18 +14,18 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.BackgroundWorkers" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BackgroundWorkers" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.*" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.1.*" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" /> <PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

4
src/EventHub.DbMigrator/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net5.0/ app/ COPY bin/Release/net6.0/ app/
WORKDIR /app WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.DbMigrator.dll"] ENTRYPOINT ["dotnet", "EventHub.DbMigrator.dll"]

6
src/EventHub.DbMigrator/EventHub.DbMigrator.csproj

@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -23,11 +23,11 @@
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<ProjectReference Include="..\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj" /> <ProjectReference Include="..\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj" />
<ProjectReference Include="..\EventHub.Admin.Application.Contracts\EventHub.Admin.Application.Contracts.csproj" /> <ProjectReference Include="..\EventHub.Admin.Application.Contracts\EventHub.Admin.Application.Contracts.csproj" />
<ProjectReference Include="..\EventHub.EntityFrameworkCore\EventHub.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\EventHub.EntityFrameworkCore\EventHub.EntityFrameworkCore.csproj" />

16
src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj

@ -9,13 +9,13 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.Domain.Shared" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -24,7 +24,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
src/EventHub.Domain.Shared/Organizations/OrganizationContst.cs

@ -26,5 +26,7 @@
public const int MaxInstagramUsernameLength = 24; public const int MaxInstagramUsernameLength = 24;
public const int MaxMediumUsernameLength = 24; public const int MaxMediumUsernameLength = 24;
public static string[] AllowedProfilePictureExtensions = { ".jpg", ".png" };
} }
} }

2
src/EventHub.Domain/Data/IdentityServerDataSeedContributor.cs

@ -114,7 +114,7 @@ namespace EventHub.Data
private async Task<ApiScope> CreateApiScopeAsync(string name) private async Task<ApiScope> CreateApiScopeAsync(string name)
{ {
var apiScope = await _apiScopeRepository.GetByNameAsync(name); var apiScope = await _apiScopeRepository.FindByNameAsync(name);
if (apiScope == null) if (apiScope == null)
{ {
apiScope = await _apiScopeRepository.InsertAsync( apiScope = await _apiScopeRepository.InsertAsync(

22
src/EventHub.Domain/EventHub.Domain.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup> </PropertyGroup>
@ -13,15 +13,15 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.Domain" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.Domain" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Emailing" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Emailing" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.Domain" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -30,7 +30,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

10
src/EventHub.Domain/Events/EventUrlHelper.cs

@ -5,21 +5,27 @@ namespace EventHub.Events
{ {
internal static class EventUrlHelper internal static class EventUrlHelper
{ {
private static string AllowedUrlChars = "abcdefghijklmnopqrstuvwxyz0123456789"; private static string AllowedUrlChars = "abcdefghijklmnopqrstuvwxyz0123456789-";
public static string ConvertTitleToUrlPart(string title) public static string ConvertTitleToUrlPart(string title)
{ {
var normalizedTitle = title var normalizedTitle = title
.Trim()
.Replace(' ', '-') .Replace(' ', '-')
.ToKebabCase() .ToKebabCase()
.ToLowerInvariant(); .ToLowerInvariant();
var urlPartBuilder = new StringBuilder(); var urlPartBuilder = new StringBuilder();
char previousChar = ' ';
foreach (var c in normalizedTitle) foreach (var c in normalizedTitle)
{ {
if (AllowedUrlChars.Contains(c)) if (AllowedUrlChars.Contains(c))
{ {
if (previousChar == '-' && c == '-')
{
continue;
}
urlPartBuilder.Append(c); urlPartBuilder.Append(c);
} }
@ -27,6 +33,8 @@ namespace EventHub.Events
{ {
break; break;
} }
previousChar = c;
} }
return urlPartBuilder.ToString(); return urlPartBuilder.ToString();

32
src/EventHub.Domain/Events/Registrations/EventRegistrationManager.cs

@ -1,19 +1,26 @@
using System; using System.Threading.Tasks;
using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Volo.Abp.Guids;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.Timing;
namespace EventHub.Events.Registrations namespace EventHub.Events.Registrations
{ {
public class EventRegistrationManager : DomainService public class EventRegistrationManager : IDomainService
{ {
private readonly IRepository<EventRegistration, Guid> _eventRegistrationRepository; private readonly IEventRegistrationRepository _eventRegistrationRepository;
private readonly IGuidGenerator _guidGenerator;
private readonly IClock _clock;
public EventRegistrationManager(IRepository<EventRegistration, Guid> eventRegistrationRepository) public EventRegistrationManager(
IEventRegistrationRepository eventRegistrationRepository,
IGuidGenerator guidGenerator,
IClock clock)
{ {
_eventRegistrationRepository = eventRegistrationRepository; _eventRegistrationRepository = eventRegistrationRepository;
_guidGenerator = guidGenerator;
_clock = clock;
} }
public async Task RegisterAsync( public async Task RegisterAsync(
@ -30,7 +37,7 @@ namespace EventHub.Events.Registrations
return; return;
} }
var registrationCount = await _eventRegistrationRepository.CountAsync(x => x.EventId == @event.Id); var registrationCount = await _eventRegistrationRepository.GetCountAsync(@event.Id);
if (@event.Capacity != null && registrationCount >= @event.Capacity) if (@event.Capacity != null && registrationCount >= @event.Capacity)
{ {
@ -40,7 +47,7 @@ namespace EventHub.Events.Registrations
await _eventRegistrationRepository.InsertAsync( await _eventRegistrationRepository.InsertAsync(
new EventRegistration( new EventRegistration(
GuidGenerator.Create(), _guidGenerator.Create(),
@event.Id, @event.Id,
user.Id user.Id
) )
@ -66,17 +73,12 @@ namespace EventHub.Events.Registrations
IdentityUser user) IdentityUser user)
{ {
return await _eventRegistrationRepository return await _eventRegistrationRepository
.AnyAsync(x => x.EventId == @event.Id && x.UserId == user.Id); .ExistsAsync(@event.Id, user.Id);
} }
public bool IsPastEvent(Event @event) public bool IsPastEvent(Event @event)
{ {
if (Clock.Now > @event.EndTime) return _clock.Now > @event.EndTime;
{
return true;
}
return false;
} }
} }
} }

2
src/EventHub.Domain/Events/Registrations/IEventRegistrationRepository.cs

@ -17,5 +17,7 @@ namespace EventHub.Events.Registrations
int maxResultCount = int.MaxValue, int maxResultCount = int.MaxValue,
CancellationToken cancellationToken = default CancellationToken cancellationToken = default
); );
Task<bool> ExistsAsync(Guid eventId, Guid userId);
} }
} }

2
src/EventHub.Domain/Organizations/OrganizationManager.cs

@ -21,6 +21,8 @@ namespace EventHub.Organizations
string displayName, string displayName,
string description) string description)
{ {
name = name.Trim().Replace(' ', '-').ToKebabCase().ToLowerInvariant();;
if (await _organizationRepository.AnyAsync(o => o.Name == name)) if (await _organizationRepository.AnyAsync(o => o.Name == name))
{ {
throw new BusinessException(EventHubErrorCodes.OrganizationNameAlreadyExists) throw new BusinessException(EventHubErrorCodes.OrganizationNameAlreadyExists)

1
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs

@ -4,6 +4,7 @@ using EventHub.Events.Registrations;
using EventHub.Organizations; using EventHub.Organizations;
using EventHub.Organizations.Memberships; using EventHub.Organizations.Memberships;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System;
using Volo.Abp.AuditLogging.EntityFrameworkCore; using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;

1
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs

@ -4,6 +4,7 @@ using EventHub.Events.Registrations;
using EventHub.Organizations; using EventHub.Organizations;
using EventHub.Organizations.Memberships; using EventHub.Organizations.Memberships;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.Identity; using Volo.Abp.Identity;

5
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs

@ -9,6 +9,7 @@ using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore; using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.PostgreSql; using Volo.Abp.EntityFrameworkCore.PostgreSql;
using System;
namespace EventHub.EntityFrameworkCore namespace EventHub.EntityFrameworkCore
{ {
@ -28,6 +29,10 @@ namespace EventHub.EntityFrameworkCore
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
{ {
EventHubEfCoreEntityExtensionMappings.Configure(); EventHubEfCoreEntityExtensionMappings.Configure();
//allows to use DateTime with timezone (by default)
//See: https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
} }
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)

7
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/Events/Registrations/EventRegistrationRepository.cs

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity; using Volo.Abp.Identity;
@ -57,5 +58,11 @@ namespace EventHub.EntityFrameworkCore.Events.Registrations
return await query.ToListAsync(GetCancellationToken(cancellationToken)); return await query.ToListAsync(GetCancellationToken(cancellationToken));
} }
public async Task<bool> ExistsAsync(Guid eventId, Guid userId)
{
var dbSet = await GetDbSetAsync();
return await dbSet.AnyAsync(x => x.EventId == eventId && x.UserId == userId);
}
} }
} }

23
src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj

@ -1,26 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="5.0.0-beta.1" />
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" /> <ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-rc.*" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2634
src/EventHub.EntityFrameworkCore/Migrations/20211008110036_Added_IsActive_To_IdentityUser.Designer.cs

File diff suppressed because it is too large

773
src/EventHub.EntityFrameworkCore/Migrations/20211008110036_Added_IsActive_To_IdentityUser.cs

@ -0,0 +1,773 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EventHub.Migrations
{
public partial class Added_IsActive_To_IdentityUser : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerPersistedGrants",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerPersistedGrants",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ConsumedTime",
table: "IdentityServerPersistedGrants",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerIdentityResources",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerIdentityResources",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerIdentityResources",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerDeviceFlowCodes",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerDeviceFlowCodes",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerClientSecrets",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerClients",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerClients",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerClients",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerApiScopes",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerApiScopes",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerApiScopes",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerApiResourceSecrets",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerApiResources",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerApiResources",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerApiResources",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "EhOrganizations",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "EhOrganizations",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhOrganizations",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhOrganizationMemberships",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "StartTime",
table: "EhEvents",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "EhEvents",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "EndTime",
table: "EhEvents",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "EhEvents",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhEvents",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhEventRegistrations",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "AbpUsers",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "AbpUsers",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpUsers",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AddColumn<bool>(
name: "IsActive",
table: "AbpUsers",
type: "boolean",
nullable: false,
defaultValue: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpUserOrganizationUnits",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpSecurityLogs",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "AbpOrganizationUnits",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "AbpOrganizationUnits",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpOrganizationUnits",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpOrganizationUnitRoles",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ChangeTime",
table: "AbpEntityChanges",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "NextTryTime",
table: "AbpBackgroundJobs",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastTryTime",
table: "AbpBackgroundJobs",
type: "timestamp with time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpBackgroundJobs",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ExecutionTime",
table: "AbpAuditLogs",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ExecutionTime",
table: "AbpAuditLogActions",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp without time zone");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsActive",
table: "AbpUsers");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerPersistedGrants",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerPersistedGrants",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ConsumedTime",
table: "IdentityServerPersistedGrants",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerIdentityResources",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerIdentityResources",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerIdentityResources",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerDeviceFlowCodes",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerDeviceFlowCodes",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerClientSecrets",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerClients",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerClients",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerClients",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerApiScopes",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerApiScopes",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerApiScopes",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "Expiration",
table: "IdentityServerApiResourceSecrets",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerApiResources",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerApiResources",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerApiResources",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "EhOrganizations",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "EhOrganizations",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhOrganizations",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhOrganizationMemberships",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "StartTime",
table: "EhEvents",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "EhEvents",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "EndTime",
table: "EhEvents",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "EhEvents",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhEvents",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "EhEventRegistrations",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "AbpUsers",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "AbpUsers",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpUsers",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpUserOrganizationUnits",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpSecurityLogs",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastModificationTime",
table: "AbpOrganizationUnits",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DeletionTime",
table: "AbpOrganizationUnits",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpOrganizationUnits",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpOrganizationUnitRoles",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ChangeTime",
table: "AbpEntityChanges",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "NextTryTime",
table: "AbpBackgroundJobs",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "LastTryTime",
table: "AbpBackgroundJobs",
type: "timestamp without time zone",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CreationTime",
table: "AbpBackgroundJobs",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ExecutionTime",
table: "AbpAuditLogs",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn<DateTime>(
name: "ExecutionTime",
table: "AbpAuditLogActions",
type: "timestamp without time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
}
}
}

200
src/EventHub.EntityFrameworkCore/Migrations/EventHubDbContextModelSnapshot.cs

@ -7,6 +7,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace EventHub.Migrations namespace EventHub.Migrations
{ {
[DbContext(typeof(EventHubDbContext))] [DbContext(typeof(EventHubDbContext))]
@ -17,9 +19,10 @@ namespace EventHub.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("Relational:MaxIdentifierLength", 63) .HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("ProductVersion", "5.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 63);
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("EventHub.Countries.Country", b => modelBuilder.Entity("EventHub.Countries.Country", b =>
{ {
@ -35,7 +38,7 @@ namespace EventHub.Migrations
b.HasIndex("Name"); b.HasIndex("Name");
b.ToTable("EhCountries"); b.ToTable("EhCountries", (string)null);
}); });
modelBuilder.Entity("EventHub.Events.Event", b => modelBuilder.Entity("EventHub.Events.Event", b =>
@ -63,7 +66,7 @@ namespace EventHub.Migrations
.HasColumnType("text"); .HasColumnType("text");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -75,7 +78,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Description") b.Property<string>("Description")
@ -84,7 +87,7 @@ namespace EventHub.Migrations
.HasColumnType("character varying(2000)"); .HasColumnType("character varying(2000)");
b.Property<DateTime>("EndTime") b.Property<DateTime>("EndTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
.HasColumnType("text") .HasColumnType("text")
@ -115,7 +118,7 @@ namespace EventHub.Migrations
.HasColumnType("character varying(16)"); .HasColumnType("character varying(16)");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -130,7 +133,7 @@ namespace EventHub.Migrations
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<DateTime>("StartTime") b.Property<DateTime>("StartTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<int>("TimingChangeCount") b.Property<int>("TimingChangeCount")
.HasColumnType("integer"); .HasColumnType("integer");
@ -164,7 +167,7 @@ namespace EventHub.Migrations
b.HasIndex("OrganizationId", "StartTime"); b.HasIndex("OrganizationId", "StartTime");
b.ToTable("EhEvents"); b.ToTable("EhEvents", (string)null);
}); });
modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b => modelBuilder.Entity("EventHub.Events.Registrations.EventRegistration", b =>
@ -179,7 +182,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -202,7 +205,7 @@ namespace EventHub.Migrations
b.HasIndex("EventId", "UserId"); b.HasIndex("EventId", "UserId");
b.ToTable("EhEventRegistrations"); b.ToTable("EhEventRegistrations", (string)null);
}); });
modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b => modelBuilder.Entity("EventHub.Organizations.Memberships.OrganizationMembership", b =>
@ -217,7 +220,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -240,7 +243,7 @@ namespace EventHub.Migrations
b.HasIndex("OrganizationId", "UserId"); b.HasIndex("OrganizationId", "UserId");
b.ToTable("EhOrganizationMemberships"); b.ToTable("EhOrganizationMemberships", (string)null);
}); });
modelBuilder.Entity("EventHub.Organizations.Organization", b => modelBuilder.Entity("EventHub.Organizations.Organization", b =>
@ -255,7 +258,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -267,7 +270,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Description") b.Property<string>("Description")
@ -300,7 +303,7 @@ namespace EventHub.Migrations
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -335,7 +338,7 @@ namespace EventHub.Migrations
b.HasIndex("OwnerUserId"); b.HasIndex("OwnerUserId");
b.ToTable("EhOrganizations"); b.ToTable("EhOrganizations", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
@ -393,7 +396,7 @@ namespace EventHub.Migrations
.HasColumnName("ExecutionDuration"); .HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime") b.Property<DateTime>("ExecutionTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
.HasColumnType("text") .HasColumnType("text")
@ -443,7 +446,7 @@ namespace EventHub.Migrations
b.HasIndex("TenantId", "UserId", "ExecutionTime"); b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs"); b.ToTable("AbpAuditLogs", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
@ -461,7 +464,7 @@ namespace EventHub.Migrations
.HasColumnName("ExecutionDuration"); .HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime") b.Property<DateTime>("ExecutionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("ExecutionTime"); .HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
@ -493,7 +496,7 @@ namespace EventHub.Migrations
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions"); b.ToTable("AbpAuditLogActions", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
@ -507,7 +510,7 @@ namespace EventHub.Migrations
.HasColumnName("AuditLogId"); .HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime") b.Property<DateTime>("ChangeTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("ChangeTime"); .HasColumnName("ChangeTime");
b.Property<byte>("ChangeType") b.Property<byte>("ChangeType")
@ -543,7 +546,7 @@ namespace EventHub.Migrations
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges"); b.ToTable("AbpEntityChanges", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
@ -585,7 +588,7 @@ namespace EventHub.Migrations
b.HasIndex("EntityChangeId"); b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges"); b.ToTable("AbpEntityPropertyChanges", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
@ -601,7 +604,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
@ -624,10 +627,10 @@ namespace EventHub.Migrations
.HasColumnType("character varying(128)"); .HasColumnType("character varying(128)");
b.Property<DateTime?>("LastTryTime") b.Property<DateTime?>("LastTryTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<DateTime>("NextTryTime") b.Property<DateTime>("NextTryTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<byte>("Priority") b.Property<byte>("Priority")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
@ -643,7 +646,7 @@ namespace EventHub.Migrations
b.HasIndex("IsAbandoned", "NextTryTime"); b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs"); b.ToTable("AbpBackgroundJobs", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
@ -684,7 +687,7 @@ namespace EventHub.Migrations
b.HasIndex("TenantId", "ContainerId", "Name"); b.HasIndex("TenantId", "ContainerId", "Name");
b.ToTable("AbpBlobs"); b.ToTable("AbpBlobs", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b =>
@ -716,7 +719,7 @@ namespace EventHub.Migrations
b.HasIndex("TenantId", "Name"); b.HasIndex("TenantId", "Name");
b.ToTable("AbpBlobContainers"); b.ToTable("AbpBlobContainers", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
@ -762,7 +765,7 @@ namespace EventHub.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("AbpClaimTypes"); b.ToTable("AbpClaimTypes", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
@ -787,7 +790,7 @@ namespace EventHub.Migrations
b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId")
.IsUnique(); .IsUnique();
b.ToTable("AbpLinkUsers"); b.ToTable("AbpLinkUsers", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
@ -835,7 +838,7 @@ namespace EventHub.Migrations
b.HasIndex("NormalizedName"); b.HasIndex("NormalizedName");
b.ToTable("AbpRoles"); b.ToTable("AbpRoles", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
@ -863,7 +866,7 @@ namespace EventHub.Migrations
b.HasIndex("RoleId"); b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims"); b.ToTable("AbpRoleClaims", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
@ -902,7 +905,7 @@ namespace EventHub.Migrations
.HasColumnType("character varying(64)"); .HasColumnType("character varying(64)");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
.HasColumnType("text") .HasColumnType("text")
@ -937,7 +940,7 @@ namespace EventHub.Migrations
b.HasIndex("TenantId", "UserId"); b.HasIndex("TenantId", "UserId");
b.ToTable("AbpSecurityLogs"); b.ToTable("AbpSecurityLogs", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
@ -958,7 +961,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -970,7 +973,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Email") b.Property<string>("Email")
@ -989,6 +992,9 @@ namespace EventHub.Migrations
.HasColumnType("text") .HasColumnType("text")
.HasColumnName("ExtraProperties"); .HasColumnName("ExtraProperties");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsDeleted") b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("boolean") .HasColumnType("boolean")
@ -1002,7 +1008,7 @@ namespace EventHub.Migrations
.HasColumnName("IsExternal"); .HasColumnName("IsExternal");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -1088,7 +1094,7 @@ namespace EventHub.Migrations
b.HasIndex("UserName"); b.HasIndex("UserName");
b.ToTable("AbpUsers"); b.ToTable("AbpUsers", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
@ -1116,7 +1122,7 @@ namespace EventHub.Migrations
b.HasIndex("UserId"); b.HasIndex("UserId");
b.ToTable("AbpUserClaims"); b.ToTable("AbpUserClaims", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
@ -1145,7 +1151,7 @@ namespace EventHub.Migrations
b.HasIndex("LoginProvider", "ProviderKey"); b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins"); b.ToTable("AbpUserLogins", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
@ -1157,7 +1163,7 @@ namespace EventHub.Migrations
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1172,7 +1178,7 @@ namespace EventHub.Migrations
b.HasIndex("UserId", "OrganizationUnitId"); b.HasIndex("UserId", "OrganizationUnitId");
b.ToTable("AbpUserOrganizationUnits"); b.ToTable("AbpUserOrganizationUnits", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
@ -1191,7 +1197,7 @@ namespace EventHub.Migrations
b.HasIndex("RoleId", "UserId"); b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles"); b.ToTable("AbpUserRoles", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
@ -1216,7 +1222,7 @@ namespace EventHub.Migrations
b.HasKey("UserId", "LoginProvider", "Name"); b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens"); b.ToTable("AbpUserTokens", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
@ -1237,7 +1243,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1249,7 +1255,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("DisplayName") b.Property<string>("DisplayName")
@ -1269,7 +1275,7 @@ namespace EventHub.Migrations
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -1289,7 +1295,7 @@ namespace EventHub.Migrations
b.HasIndex("ParentId"); b.HasIndex("ParentId");
b.ToTable("AbpOrganizationUnits"); b.ToTable("AbpOrganizationUnits", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b =>
@ -1301,7 +1307,7 @@ namespace EventHub.Migrations
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1316,7 +1322,7 @@ namespace EventHub.Migrations
b.HasIndex("RoleId", "OrganizationUnitId"); b.HasIndex("RoleId", "OrganizationUnitId");
b.ToTable("AbpOrganizationUnitRoles"); b.ToTable("AbpOrganizationUnitRoles", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
@ -1336,7 +1342,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1348,7 +1354,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Description") b.Property<string>("Description")
@ -1373,7 +1379,7 @@ namespace EventHub.Migrations
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -1390,7 +1396,7 @@ namespace EventHub.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("IdentityServerApiResources"); b.ToTable("IdentityServerApiResources", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
@ -1404,7 +1410,7 @@ namespace EventHub.Migrations
b.HasKey("ApiResourceId", "Type"); b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiResourceClaims"); b.ToTable("IdentityServerApiResourceClaims", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
@ -1422,7 +1428,7 @@ namespace EventHub.Migrations
b.HasKey("ApiResourceId", "Key", "Value"); b.HasKey("ApiResourceId", "Key", "Value");
b.ToTable("IdentityServerApiResourceProperties"); b.ToTable("IdentityServerApiResourceProperties", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b =>
@ -1436,7 +1442,7 @@ namespace EventHub.Migrations
b.HasKey("ApiResourceId", "Scope"); b.HasKey("ApiResourceId", "Scope");
b.ToTable("IdentityServerApiResourceScopes"); b.ToTable("IdentityServerApiResourceScopes", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b =>
@ -1457,11 +1463,11 @@ namespace EventHub.Migrations
.HasColumnType("character varying(1000)"); .HasColumnType("character varying(1000)");
b.Property<DateTime?>("Expiration") b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.HasKey("ApiResourceId", "Type", "Value"); b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiResourceSecrets"); b.ToTable("IdentityServerApiResourceSecrets", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b =>
@ -1477,7 +1483,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1489,7 +1495,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Description") b.Property<string>("Description")
@ -1517,7 +1523,7 @@ namespace EventHub.Migrations
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -1537,7 +1543,7 @@ namespace EventHub.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("IdentityServerApiScopes"); b.ToTable("IdentityServerApiScopes", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b =>
@ -1551,7 +1557,7 @@ namespace EventHub.Migrations
b.HasKey("ApiScopeId", "Type"); b.HasKey("ApiScopeId", "Type");
b.ToTable("IdentityServerApiScopeClaims"); b.ToTable("IdentityServerApiScopeClaims", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b =>
@ -1569,7 +1575,7 @@ namespace EventHub.Migrations
b.HasKey("ApiScopeId", "Key", "Value"); b.HasKey("ApiScopeId", "Key", "Value");
b.ToTable("IdentityServerApiScopeProperties"); b.ToTable("IdentityServerApiScopeProperties", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
@ -1646,7 +1652,7 @@ namespace EventHub.Migrations
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1658,7 +1664,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Description") b.Property<string>("Description")
@ -1698,7 +1704,7 @@ namespace EventHub.Migrations
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -1753,7 +1759,7 @@ namespace EventHub.Migrations
b.HasIndex("ClientId"); b.HasIndex("ClientId");
b.ToTable("IdentityServerClients"); b.ToTable("IdentityServerClients", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
@ -1771,7 +1777,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "Type", "Value"); b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientClaims"); b.ToTable("IdentityServerClientClaims", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
@ -1785,7 +1791,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "Origin"); b.HasKey("ClientId", "Origin");
b.ToTable("IdentityServerClientCorsOrigins"); b.ToTable("IdentityServerClientCorsOrigins", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
@ -1799,7 +1805,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "GrantType"); b.HasKey("ClientId", "GrantType");
b.ToTable("IdentityServerClientGrantTypes"); b.ToTable("IdentityServerClientGrantTypes", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
@ -1813,7 +1819,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "Provider"); b.HasKey("ClientId", "Provider");
b.ToTable("IdentityServerClientIdPRestrictions"); b.ToTable("IdentityServerClientIdPRestrictions", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
@ -1827,7 +1833,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "PostLogoutRedirectUri"); b.HasKey("ClientId", "PostLogoutRedirectUri");
b.ToTable("IdentityServerClientPostLogoutRedirectUris"); b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
@ -1845,7 +1851,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "Key", "Value"); b.HasKey("ClientId", "Key", "Value");
b.ToTable("IdentityServerClientProperties"); b.ToTable("IdentityServerClientProperties", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
@ -1859,7 +1865,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "RedirectUri"); b.HasKey("ClientId", "RedirectUri");
b.ToTable("IdentityServerClientRedirectUris"); b.ToTable("IdentityServerClientRedirectUris", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
@ -1873,7 +1879,7 @@ namespace EventHub.Migrations
b.HasKey("ClientId", "Scope"); b.HasKey("ClientId", "Scope");
b.ToTable("IdentityServerClientScopes"); b.ToTable("IdentityServerClientScopes", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
@ -1894,11 +1900,11 @@ namespace EventHub.Migrations
.HasColumnType("character varying(2000)"); .HasColumnType("character varying(2000)");
b.Property<DateTime?>("Expiration") b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.HasKey("ClientId", "Type", "Value"); b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientSecrets"); b.ToTable("IdentityServerClientSecrets", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b =>
@ -1919,7 +1925,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -1942,7 +1948,7 @@ namespace EventHub.Migrations
b.Property<DateTime?>("Expiration") b.Property<DateTime?>("Expiration")
.IsRequired() .IsRequired()
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
.HasColumnType("text") .HasColumnType("text")
@ -1970,7 +1976,7 @@ namespace EventHub.Migrations
b.HasIndex("UserCode"); b.HasIndex("UserCode");
b.ToTable("IdentityServerDeviceFlowCodes"); b.ToTable("IdentityServerDeviceFlowCodes", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
@ -1991,10 +1997,10 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime?>("ConsumedTime") b.Property<DateTime?>("ConsumedTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("Data") b.Property<string>("Data")
.IsRequired() .IsRequired()
@ -2006,7 +2012,7 @@ namespace EventHub.Migrations
.HasColumnType("character varying(200)"); .HasColumnType("character varying(200)");
b.Property<DateTime?>("Expiration") b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties") b.Property<string>("ExtraProperties")
.HasColumnType("text") .HasColumnType("text")
@ -2036,7 +2042,7 @@ namespace EventHub.Migrations
b.HasIndex("SubjectId", "SessionId", "Type"); b.HasIndex("SubjectId", "SessionId", "Type");
b.ToTable("IdentityServerPersistedGrants"); b.ToTable("IdentityServerPersistedGrants", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
@ -2052,7 +2058,7 @@ namespace EventHub.Migrations
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId") b.Property<Guid?>("CreatorId")
@ -2064,7 +2070,7 @@ namespace EventHub.Migrations
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime") b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<string>("Description") b.Property<string>("Description")
@ -2092,7 +2098,7 @@ namespace EventHub.Migrations
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime") b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime"); .HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId") b.Property<Guid?>("LastModifierId")
@ -2112,7 +2118,7 @@ namespace EventHub.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("IdentityServerIdentityResources"); b.ToTable("IdentityServerIdentityResources", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b =>
@ -2126,7 +2132,7 @@ namespace EventHub.Migrations
b.HasKey("IdentityResourceId", "Type"); b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityResourceClaims"); b.ToTable("IdentityServerIdentityResourceClaims", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b =>
@ -2144,7 +2150,7 @@ namespace EventHub.Migrations
b.HasKey("IdentityResourceId", "Key", "Value"); b.HasKey("IdentityResourceId", "Key", "Value");
b.ToTable("IdentityServerIdentityResourceProperties"); b.ToTable("IdentityServerIdentityResourceProperties", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
@ -2176,7 +2182,7 @@ namespace EventHub.Migrations
b.HasIndex("Name", "ProviderName", "ProviderKey"); b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants"); b.ToTable("AbpPermissionGrants", (string)null);
}); });
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
@ -2207,7 +2213,7 @@ namespace EventHub.Migrations
b.HasIndex("Name", "ProviderName", "ProviderKey"); b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings"); b.ToTable("AbpSettings", (string)null);
}); });
modelBuilder.Entity("EventHub.Events.Event", b => modelBuilder.Entity("EventHub.Events.Event", b =>

2
src/EventHub.HttpApi.Client/EventHub.HttpApi.Client.csproj

@ -12,7 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Http.Client" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

28
src/EventHub.HttpApi.Host/Controllers/Events/EventController.cs

@ -6,6 +6,8 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
using Volo.Abp.VirtualFileSystem;
namespace EventHub.Controllers.Events namespace EventHub.Controllers.Events
{ {
@ -16,14 +18,18 @@ namespace EventHub.Controllers.Events
public class EventController : AbpController, IEventAppService public class EventController : AbpController, IEventAppService
{ {
private readonly IEventAppService _eventAppService; private readonly IEventAppService _eventAppService;
private readonly IVirtualFileProvider _virtualFileProvider;
public EventController(IEventAppService eventAppService) public EventController(
IEventAppService eventAppService,
IVirtualFileProvider virtualFileProvider)
{ {
_eventAppService = eventAppService; _eventAppService = eventAppService;
_virtualFileProvider = virtualFileProvider;
} }
[HttpPost] [HttpPost]
public async Task<EventDto> CreateAsync(CreateEventDto input) public async Task<EventDto> CreateAsync([FromForm] CreateEventDto input)
{ {
return await _eventAppService.CreateAsync(input); return await _eventAppService.CreateAsync(input);
} }
@ -64,16 +70,28 @@ namespace EventHub.Controllers.Events
[HttpPut] [HttpPut]
[Route("{id}")] [Route("{id}")]
public async Task UpdateAsync(Guid id, UpdateEventDto input) public async Task UpdateAsync(Guid id, [FromForm] UpdateEventDto input)
{ {
await _eventAppService.UpdateAsync(id, input); await _eventAppService.UpdateAsync(id, input);
} }
[HttpGet] [HttpGet]
[Route("cover-image/{id}")] [Route("cover-image/{id}")]
public async Task<byte[]> GetCoverImageAsync(Guid id) public async Task<IRemoteStreamContent> GetCoverImageAsync(Guid id)
{ {
return await _eventAppService.GetCoverImageAsync(id); var remoteStreamContent = await _eventAppService.GetCoverImageAsync(id);
if (remoteStreamContent is null)
{
var stream = _virtualFileProvider.GetFileInfo("/Images/eh-event.png").CreateReadStream();
remoteStreamContent = new RemoteStreamContent(stream);
await stream.FlushAsync();
}
Response.Headers.Add("Accept-Ranges", "bytes");
Response.ContentType = remoteStreamContent.ContentType;
return remoteStreamContent;
} }
} }
} }

33
src/EventHub.HttpApi.Host/Controllers/Organizations/OrganizationController.cs

@ -5,6 +5,8 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
using Volo.Abp.VirtualFileSystem;
namespace EventHub.Controllers.Organizations namespace EventHub.Controllers.Organizations
{ {
@ -15,16 +17,20 @@ namespace EventHub.Controllers.Organizations
public class OrganizationController : AbpController, IOrganizationAppService public class OrganizationController : AbpController, IOrganizationAppService
{ {
private readonly IOrganizationAppService _organizationAppService; private readonly IOrganizationAppService _organizationAppService;
private readonly IVirtualFileProvider _virtualFileProvider;
public OrganizationController(IOrganizationAppService organizationAppService) public OrganizationController(
IOrganizationAppService organizationAppService,
IVirtualFileProvider virtualFileProvider)
{ {
_organizationAppService = organizationAppService; _organizationAppService = organizationAppService;
_virtualFileProvider = virtualFileProvider;
} }
[HttpPost] [HttpPost]
public async Task CreateAsync(CreateOrganizationDto input) public async Task<OrganizationDto> CreateAsync([FromForm] CreateOrganizationDto input)
{ {
await _organizationAppService.CreateAsync(input); return await _organizationAppService.CreateAsync(input);
} }
[HttpGet] [HttpGet]
@ -56,9 +62,28 @@ namespace EventHub.Controllers.Organizations
[HttpPut] [HttpPut]
[Route("{id}")] [Route("{id}")]
public async Task UpdateAsync(Guid id, UpdateOrganizationDto input) public async Task UpdateAsync(Guid id, [FromForm] UpdateOrganizationDto input)
{ {
await _organizationAppService.UpdateAsync(id, input); await _organizationAppService.UpdateAsync(id, input);
} }
[HttpGet]
[Route("profile-picture/{id}")]
public async Task<IRemoteStreamContent> GetProfilePictureAsync(Guid id)
{
var remoteStreamContent = await _organizationAppService.GetProfilePictureAsync(id);
if (remoteStreamContent is null)
{
var stream = _virtualFileProvider.GetFileInfo("/Images/eh-organization.png").CreateReadStream();
remoteStreamContent = new RemoteStreamContent(stream);
await stream.FlushAsync();
}
Response.Headers.Add("Accept-Ranges", "bytes");
Response.ContentType = remoteStreamContent.ContentType;
return remoteStreamContent;
}
} }
} }

4
src/EventHub.HttpApi.Host/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net5.0/publish/ app/ COPY bin/Release/net6.0/publish/ app/
WORKDIR /app WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.HttpApi.Host.dll"] ENTRYPOINT ["dotnet", "EventHub.HttpApi.Host.dll"]

19
src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences> <PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId> <UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
@ -12,14 +12,14 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
<PackageReference Include="Volo.Abp.Autofac" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Swashbuckle" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -33,6 +33,7 @@
<Content Remove="Logs\**" /> <Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" /> <EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" /> <None Remove="Logs\**" />
<EmbeddedResource Include="Images\**\*.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

28
src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs

@ -11,6 +11,8 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using EventHub.EntityFrameworkCore; using EventHub.EntityFrameworkCore;
using EventHub.Events;
using EventHub.Organizations;
using EventHub.Utils; using EventHub.Utils;
using EventHub.Web; using EventHub.Web;
using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Localization;
@ -61,6 +63,18 @@ namespace EventHub
ConfigureCookies(context); ConfigureCookies(context);
ConfigureSwaggerServices(context, configuration); ConfigureSwaggerServices(context, configuration);
ConfigureBackgroundJobs(); ConfigureBackgroundJobs();
ConfigureAutoApiControllers();
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(CreateOrganizationDto));
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UpdateOrganizationDto));
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(CreateEventDto));
options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(UpdateEventDto));
});
} }
private void ConfigureBackgroundJobs() private void ConfigureBackgroundJobs()
@ -79,10 +93,14 @@ namespace EventHub
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
{ {
var hostingEnvironment = context.Services.GetHostingEnvironment(); var hostingEnvironment = context.Services.GetHostingEnvironment();
if (hostingEnvironment.IsDevelopment()) Configure<AbpVirtualFileSystemOptions>(options =>
{ {
Configure<AbpVirtualFileSystemOptions>(options => options.FileSets.AddEmbedded<EventHubHttpApiHostModule>(
baseNamespace: "EventHub",
baseFolder: "/Images");
if (hostingEnvironment.IsDevelopment())
{ {
options.FileSets.ReplaceEmbeddedByPhysical<EventHubDomainSharedModule>( options.FileSets.ReplaceEmbeddedByPhysical<EventHubDomainSharedModule>(
Path.Combine(hostingEnvironment.ContentRootPath, Path.Combine(hostingEnvironment.ContentRootPath,
@ -96,8 +114,8 @@ namespace EventHub
options.FileSets.ReplaceEmbeddedByPhysical<EventHubApplicationModule>( options.FileSets.ReplaceEmbeddedByPhysical<EventHubApplicationModule>(
Path.Combine(hostingEnvironment.ContentRootPath, Path.Combine(hostingEnvironment.ContentRootPath,
$"..{Path.DirectorySeparatorChar}EventHub.Application")); $"..{Path.DirectorySeparatorChar}EventHub.Application"));
}); }
} });
} }
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)

BIN
src/EventHub.HttpApi.Host/Images/eh-event.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
src/EventHub.HttpApi.Host/Images/eh-organization.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 KiB

4
src/EventHub.HttpApi/EventHub.HttpApi.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
</PropertyGroup> </PropertyGroup>
@ -12,7 +12,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

4
src/EventHub.IdentityServer/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net5.0/publish/ app/ COPY bin/Release/net6.0/publish/ app/
WORKDIR /app WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.IdentityServer.dll"] ENTRYPOINT ["dotnet", "EventHub.IdentityServer.dll"]

20
src/EventHub.IdentityServer/EventHub.IdentityServer.csproj

@ -3,13 +3,12 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace> <RootNamespace>EventHub</RootNamespace>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences> <PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId> <UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
@ -38,17 +37,18 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Account.Application" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.Account.Application" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

3
src/EventHub.IdentityServer/EventHubIdentityServerModule.cs

@ -41,6 +41,9 @@ namespace EventHub
typeof(AbpCachingStackExchangeRedisModule), typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpAccountWebIdentityServerModule), typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAccountApplicationModule), typeof(AbpAccountApplicationModule),
//we need to add AbpAccountHttpApiModule temporarily. (https://github.com/volosoft/volo/pull/7925).
//It should be removed with 5.0-beta.2.
typeof(AbpAccountHttpApiModule),
typeof(EventHubWebThemeModule), typeof(EventHubWebThemeModule),
typeof(EventHubEntityFrameworkCoreModule), typeof(EventHubEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule) typeof(AbpAspNetCoreSerilogModule)

35
src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml

@ -0,0 +1,35 @@
page "/Account/LoggedOut"
@model Volo.Abp.Account.Web.Pages.Account.LoggedOutModel
@using Volo.Abp.Account.Localization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Web.Pages.Account
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@inject IHtmlLocalizer<AccountResource> L
@{
Layout = ThemeManager.CurrentTheme.GetApplicationLayout();
}
@section scripts {
<abp-script-bundle name="@typeof(LoggedOutModel).FullName">
<abp-script src="/Pages/Account/LoggedOut.js" />
</abp-script-bundle>
}
@section styles {
<abp-style src="/Pages/Account/LoggedOut.css" />
}
<abp-card class="loggedOutCard">
<abp-card-body>
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title>
<abp-card-text>@L["LoggedOutText"]</abp-card-text>
@if (Model.PostLogoutRedirectUri != null)
{
<a abp-button="Primary" id="redirectButton" href="@Model.PostLogoutRedirectUri" cname="@Model.ClientName">@L["ReturnToText"]</a>
}
@if (Model.SignOutIframeUrl != null)
{
<iframe class="signout logoutiframe" src="@Model.SignOutIframeUrl"></iframe>
}
</abp-card-body>
</abp-card>

14
src/EventHub.IdentityServer/Pages/Account/LoggedOut.css

@ -0,0 +1,14 @@
.logoutiframe {
display: none;
width: 0;
height: 0;
}
.loggedOutCard {
max-width: 64rem;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)
}

2
src/EventHub.IdentityServer/package.json

@ -3,7 +3,7 @@
"name": "my-app-identityserver", "name": "my-app-identityserver",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "~4.4.0-rc.1", "@abp/aspnetcore.mvc.ui.theme.basic": "~5.0.0-beta.1",
"owl.carousel": "^2.3.4" "owl.carousel": "^2.3.4"
} }
} }

1
src/EventHub.IdentityServer/wwwroot/libs/sweetalert/sweetalert.min.js

File diff suppressed because one or more lines are too long

3122
src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

2
src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

1316
src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css

File diff suppressed because it is too large

3120
src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

1
src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css

File diff suppressed because one or more lines are too long

1
src/EventHub.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js

File diff suppressed because one or more lines are too long

261
src/EventHub.IdentityServer/yarn.lock

@ -2,37 +2,37 @@
# yarn lockfile v1 # yarn lockfile v1
"@abp/aspnetcore.mvc.ui.theme.basic@~4.4.0-rc.1": "@abp/aspnetcore.mvc.ui.theme.basic@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-4.4.0-rc.1.tgz#327a26fd71183ea2b4264ce12e4558310e8243b3" resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-5.0.0-beta.1.tgz#2c78c2bd977a67f6c2ed77cfcd404cf9533eaaae"
integrity sha512-YycorI8c5EUx0Wi50R+Vrvd3m52RTntDB51y0u+2/UebEP9TkJfw0BowLDRqISLKQ1cqnrh5U+JlwPIUFD9hTA== integrity sha512-b8Boztxd5NbaDlXQvgHXHtw8ZNgM4tEgo14kw/bN3mcLx05fWLGd8Lzfdi7i+Ju6U3rKbgi+0MSbga93A0KSmg==
dependencies: dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "~4.4.0-rc.1" "@abp/aspnetcore.mvc.ui.theme.shared" "~5.0.0-beta.1"
"@abp/aspnetcore.mvc.ui.theme.shared@~4.4.0-rc.1": "@abp/aspnetcore.mvc.ui.theme.shared@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-4.4.0-rc.1.tgz#fe3b8aab3db2a5406b68db0355942e1267c1c81e" resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-5.0.0-beta.1.tgz#25596652bb3f7b6bac5bbd966a731144cd9646c6"
integrity sha512-QA861zNC2nrNxy5P7A7YtJrA6cRz6yvGIZEnasqYUQ3pqrmkV526AoPJrxIYfn8gjs2FiUHcEIirYx9IriL0Pg== integrity sha512-N4SHu6rn8alK4jdve00IscngrfvqJNEjrwQclXNmP9c4NtPuVM9emZdxBzKF8jFb6Hz8HiwM9H3xV/SjKCS/7A==
dependencies: dependencies:
"@abp/aspnetcore.mvc.ui" "~4.4.0-rc.1" "@abp/aspnetcore.mvc.ui" "~5.0.0-beta.1"
"@abp/bootstrap" "~4.4.0-rc.1" "@abp/bootstrap" "~5.0.0-beta.1"
"@abp/bootstrap-datepicker" "~4.4.0-rc.1" "@abp/bootstrap-datepicker" "~5.0.0-beta.1"
"@abp/datatables.net-bs4" "~4.4.0-rc.1" "@abp/datatables.net-bs4" "~5.0.0-beta.1"
"@abp/font-awesome" "~4.4.0-rc.1" "@abp/font-awesome" "~5.0.0-beta.1"
"@abp/jquery-form" "~4.4.0-rc.1" "@abp/jquery-form" "~5.0.0-beta.1"
"@abp/jquery-validation-unobtrusive" "~4.4.0-rc.1" "@abp/jquery-validation-unobtrusive" "~5.0.0-beta.1"
"@abp/lodash" "~4.4.0-rc.1" "@abp/lodash" "~5.0.0-beta.1"
"@abp/luxon" "~4.4.0-rc.1" "@abp/luxon" "~5.0.0-beta.1"
"@abp/malihu-custom-scrollbar-plugin" "~4.4.0-rc.1" "@abp/malihu-custom-scrollbar-plugin" "~5.0.0-beta.1"
"@abp/select2" "~4.4.0-rc.1" "@abp/select2" "~5.0.0-beta.1"
"@abp/sweetalert" "~4.4.0-rc.1" "@abp/sweetalert2" "~5.0.0-beta.1"
"@abp/timeago" "~4.4.0-rc.1" "@abp/timeago" "~5.0.0-beta.1"
"@abp/toastr" "~4.4.0-rc.1" "@abp/toastr" "~5.0.0-beta.1"
"@abp/aspnetcore.mvc.ui@~4.4.0-rc.1": "@abp/aspnetcore.mvc.ui@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-4.4.0-rc.1.tgz#c086d5b1b4fa2b977779ed6e666e897879c7f3cf" resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-5.0.0-beta.1.tgz#30c14386899596bf91e8871810dbaa1a0e51e996"
integrity sha512-cBzMQYmPJiXxo3z6PhLV5Sq61sWTN5e4139tpQepma4ctYBlV1+jQnNxmfCRVQio98YDk72kdkOtt7qQtP+TlA== integrity sha512-pabiGHghC62eg95RfAncEt0+yGdBxdMmyqCXV+Be4JjaMz/hGZIDOPIYnaqCayZtyMmIRqG6IAwi99DqBjkQAQ==
dependencies: dependencies:
ansi-colors "^4.1.1" ansi-colors "^4.1.1"
extend-object "^1.0.0" extend-object "^1.0.0"
@ -41,145 +41,145 @@
merge-stream "^2.0.0" merge-stream "^2.0.0"
micromatch "^4.0.2" micromatch "^4.0.2"
"@abp/bootstrap-datepicker@~4.4.0-rc.1": "@abp/bootstrap-datepicker@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-4.4.0-rc.1.tgz#9885772427e4dbcc98d76a404a6a85e84e32671f" resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-5.0.0-beta.1.tgz#727e0f7305a94c95ece152ffff011bcff621f46d"
integrity sha512-Rb27WGmTTk4duDkQP8wO6N1xjSgXvmgW7zbKsoyzBPrySDsT+MyCXKWyslyEBg0Fk4HUhiRARVRAecOBnFq+dg== integrity sha512-txhdlJqyO2D9MkGLYgrsiDaC58cb2eCpk2uxoqqQeVWvuRPo/L+9rCBk+bu6J37FGJtU8aabtHJyR5xnYbv0TQ==
dependencies: dependencies:
bootstrap-datepicker "^1.9.0" bootstrap-datepicker "^1.9.0"
"@abp/bootstrap@~4.4.0-rc.1": "@abp/bootstrap@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-4.4.0-rc.1.tgz#cf5caf4e33e3afcd763603622c22c1585f49d21b" resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-5.0.0-beta.1.tgz#075a15459ff8e3896b6553786e6c8f091c6ffcad"
integrity sha512-TytaRAVAxH/zIA3xLv/Kt909dou4EO57lnqz/wNorzoBxXdwmSDcIGx7IZkmQwXih8Sj+opC4QORJ6w02FMprA== integrity sha512-W8z6qSAsRoXmG0++xH6Bk1oRc90hFqVcjKI+5XgBQhUUCn2qBruBYOKFxPg2GeT2f1k9K5TrCEnnVrh0sOP9/A==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
bootstrap "^4.6.0" bootstrap "^4.6.0"
bootstrap-v4-rtl "4.6.0-1" bootstrap-v4-rtl "4.6.0-1"
"@abp/core@~4.4.0-rc.1": "@abp/core@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/core/-/core-4.4.0-rc.1.tgz#cf31b5a0136e388d6d300b5274ccaedd6f886b42" resolved "https://registry.yarnpkg.com/@abp/core/-/core-5.0.0-beta.1.tgz#6cff06b13529ab9d7a6ddc4e89dc40616e6b7739"
integrity sha512-q8yh3nQhBV85hfn3D0K3yWoj7wxvTw7ZjYA3+YpIClyG3/W4+PB/eAC7+VjybMxX4BMpt/694kYHNd7s78DxRA== integrity sha512-TK1CnurJIK/SXfsNTk6HSpxdaJgVxwvqNd4F3fxCC0Uj8s5viD3TAGk39Hkp4909WGfNrRq8BEUNvTYM/rP6gg==
dependencies: dependencies:
"@abp/utils" "^4.4.0-rc.1" "@abp/utils" "^5.0.0-beta.1"
"@abp/datatables.net-bs4@~4.4.0-rc.1": "@abp/datatables.net-bs4@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-4.4.0-rc.1.tgz#8b597f4205c5cf6eeab252968767f27bead51cbf" resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-5.0.0-beta.1.tgz#110d7d8cf1c15db7432d8f0649f4317ba8de10dd"
integrity sha512-Tuoa5qOv4XPo7EJHU9lzFYFn0DFVG3jFTaCxruKLybPXnNCmyzgwLuQmD0U2hI/oRGb0JILcD6QCfOqfOs7Jsg== integrity sha512-CPodZP9pqLdwnFZ77/mcSfuhyK1WMi/c+9VWpGXFQSGaABNKPP2UIdAChwUcBRdGkZRa/IhXx3CCr1ZMLpJsMQ==
dependencies: dependencies:
"@abp/datatables.net" "~4.4.0-rc.1" "@abp/datatables.net" "~5.0.0-beta.1"
datatables.net-bs4 "^1.10.21" datatables.net-bs4 "^1.10.21"
"@abp/datatables.net@~4.4.0-rc.1": "@abp/datatables.net@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-4.4.0-rc.1.tgz#c8996770323bd4310c4d2b057d5ceb396aa159f2" resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-5.0.0-beta.1.tgz#8e784a011d33de154554f3239c448fcfd8adb713"
integrity sha512-67Gy/nNE3z8XfGUdQGpA491r6NOPpyBChrqnenhsMiNq65ZJVcJDgtc5KLc8hDXMvNFtuTXNRBgLpK8Xs5R/LQ== integrity sha512-mRMYqTCoYLmDLvL+CvmwUS4JqCqdkn6mxHd7zgkaR04xlGLEmNae5aGbs1wURJ86MOWrHbfkx66lQjkul3zbQw==
dependencies: dependencies:
"@abp/jquery" "~4.4.0-rc.1" "@abp/jquery" "~5.0.0-beta.1"
datatables.net "^1.10.21" datatables.net "^1.10.21"
"@abp/font-awesome@~4.4.0-rc.1": "@abp/font-awesome@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-4.4.0-rc.1.tgz#8305b6e26b22afd29a71407c033362bdf3cf6eec" resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-5.0.0-beta.1.tgz#3ae721c447a009601226c381a20dc4adabe154e1"
integrity sha512-vmPn7Kvy2F1WHFzypymnGKQtYCkYSZMH288wuhdvqEPosHsmK583eqFuoF1kXE4T2D84nhyXC/mGxv2053NvQQ== integrity sha512-fsMqwApogZ1rAogStQxBX/Nh8akXPW/Alm8UayfK6TXIkPPjBz5RQSHfdlosG7M/U3mwUNGcLlaDvQXsE/nqow==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
"@fortawesome/fontawesome-free" "^5.13.0" "@fortawesome/fontawesome-free" "^5.13.0"
"@abp/jquery-form@~4.4.0-rc.1": "@abp/jquery-form@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-4.4.0-rc.1.tgz#ba4c468014cd3f95641daf856e024ad5153268a4" resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-5.0.0-beta.1.tgz#d13f4cffce48125547b9da57cfc407f9a35a89e6"
integrity sha512-hWEousKP7h4C8IQj9a/4aYSCi7HXiBQemRt9tCyERQMMD1lz22+PYVrFJvnVJT0nh/t9tbfKzpW6pRHorQu4fA== integrity sha512-RYE90XIDxWkvxO5ukuZ2PHk6aA/o7NQKLcR9WsN1G2xTU/frrNPgtruGRTIj7Nx3BPUeMp7EAN2rYZwglcnO5g==
dependencies: dependencies:
"@abp/jquery" "~4.4.0-rc.1" "@abp/jquery" "~5.0.0-beta.1"
jquery-form "^4.3.0" jquery-form "^4.3.0"
"@abp/jquery-validation-unobtrusive@~4.4.0-rc.1": "@abp/jquery-validation-unobtrusive@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.4.0-rc.1.tgz#399c82f2d5818f484998a90776a19fd89fb09ff4" resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-5.0.0-beta.1.tgz#93ff6ee92bccdde77816bfb434e967fd142f6b83"
integrity sha512-GSQaOp3xjhQp91C6rbPFpTC78yv6wqy8N21ZV0Ncl1f5jTMi34XBD2ysT5ruhzjDhEEmihULwzGZdkNTBCmmkw== integrity sha512-LZE1KIALGBCINdWrHzoGczekUFtKwbXbLIgb4ZgiipO5Xja7py/iVvts10QWqUzhnBk+kmbHbj+KnjdqP4Z8pQ==
dependencies: dependencies:
"@abp/jquery-validation" "~4.4.0-rc.1" "@abp/jquery-validation" "~5.0.0-beta.1"
jquery-validation-unobtrusive "^3.2.11" jquery-validation-unobtrusive "^3.2.11"
"@abp/jquery-validation@~4.4.0-rc.1": "@abp/jquery-validation@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-4.4.0-rc.1.tgz#f27e0ecf9787a7b4a733067f28dd757bbd2a1b86" resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-5.0.0-beta.1.tgz#2964ca1266b087e4c4c0e768bfc4bfe0284e4ff5"
integrity sha512-nATvgXwLoZVJrOV8NGo2QyOrLbblethTBiJ8TgonOXJAiWOQlIKNgsVKeyy8/nF3W48NqDgsZagt1JNXNEbcYg== integrity sha512-ZDNdkPy2ZNu0EYDNH20Oh9R3bICCYv9CbEj4zZ8Qavixo9VTkybY3BW0nYjcu1yb1P92gZPp80W8vyfxSo//kw==
dependencies: dependencies:
"@abp/jquery" "~4.4.0-rc.1" "@abp/jquery" "~5.0.0-beta.1"
jquery-validation "^1.19.2" jquery-validation "^1.19.2"
"@abp/jquery@~4.4.0-rc.1": "@abp/jquery@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-4.4.0-rc.1.tgz#de1d8824b422ac96e4a07ee167058c00411786d9" resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-5.0.0-beta.1.tgz#360e7a164b6b4ce615a5ad91a1c78ef6893648f3"
integrity sha512-StOe74MNhXqTNAdnCkrG/UM77keR9TYEiZ2vLOW23cteOgV8ohhJXH7xhNKfFkiQBla88utt7Txyx8VNA12E/Q== integrity sha512-v2t+76L45tlbpGeVR39GurZl60Rj1pR/TdUidpP6zwnpx1Y3I+CvlJNDwTESeE/ixTOT3PyFbXoMEi6hI+v39A==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
jquery "~3.6.0" jquery "~3.6.0"
"@abp/lodash@~4.4.0-rc.1": "@abp/lodash@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-4.4.0-rc.1.tgz#1a07a87e9f360a4a1f2ed4fd19743145aa411e33" resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-5.0.0-beta.1.tgz#618797bde42b17f91d7f99fdd5f24cb5e8a361b3"
integrity sha512-Gm10DDUTulWIw4XnPDXiy7A2xfGPD1UueRqLhrJ0JT0mgnys6Kaib49tsnzDhPJBv07Oufnw+p57Aq+YUOF4fg== integrity sha512-WsUjzHRZ6RkSMd5PTw0oWijDbbq/Wgonv8++ufUZi1WK5spZi9ohjcYM4io3Ms3fG+g4pWznaicYraMpV5tcsQ==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
lodash "^4.17.15" lodash "^4.17.15"
"@abp/luxon@~4.4.0-rc.1": "@abp/luxon@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-4.4.0-rc.1.tgz#5c3f4ac1fcdfb80d79a4dd50381eaff38637949f" resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-5.0.0-beta.1.tgz#fc81fcbfb592d3baf7b9856b3cecf5b86df4bfdf"
integrity sha512-bfLgQJE3WAEIC3HxfCFTdMNWNs/nCe9pDGN8qsiUmQ0P0ZEQzkXvNSRe9idQP2Cbn/0q0+y44oa9v2sLT1LGsQ== integrity sha512-t4lhJ/wr1rAVH1/bnzmc8niZYvolTuXUB0h6A6UYaw205QyNtimzusYkTwkc+Z3xHFUrkLCoG7J2SVoCJuioaA==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
luxon "^1.24.1" luxon "^1.24.1"
"@abp/malihu-custom-scrollbar-plugin@~4.4.0-rc.1": "@abp/malihu-custom-scrollbar-plugin@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-4.4.0-rc.1.tgz#370a459024f62abfb58c73cc63c42e3183374e82" resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-5.0.0-beta.1.tgz#7af43d30af9b1f741fd9d9559d100aa4a5c52ae9"
integrity sha512-bzlQDE9u99nPw0XOqORSUd57IwN2N7EmJgSrsZ1kY5YRqA1KXZFMoUBxuBHvYR38+IAN6h79wF2yMxT79dTU6w== integrity sha512-B195PC4/75W0EXjGEQUd/ZARb/eGWj8DX7hq3K+J+lUWzWu46dZy8s5bBij78HqxS91/q6nbxU35Z+E9xl6ICg==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
malihu-custom-scrollbar-plugin "^3.1.5" malihu-custom-scrollbar-plugin "^3.1.5"
"@abp/select2@~4.4.0-rc.1": "@abp/select2@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-4.4.0-rc.1.tgz#219e3999bae4bae26bfaf2290e9cc6b79f3632eb" resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-5.0.0-beta.1.tgz#15988165fcfed2ebc2b8d097965e2dc1984af35e"
integrity sha512-qhJZOt6e9mTggS8Qn779OtUZADwbvtErZa4xgRgwS4lzBJEpQjZzfBVnKQZ7K74MOn7nHRFvC4dTEDbzhcfukg== integrity sha512-SF+NkWDJNz1EeEimW5luaCMPTNN1oPzEWs47usPJo8m7HfijEvF3rymJ8jL5zWIOo05Tx3HUurLSVz0qu4vZsw==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
select2 "^4.0.13" select2 "^4.0.13"
"@abp/sweetalert@~4.4.0-rc.1": "@abp/sweetalert2@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-4.4.0-rc.1.tgz#35f678daca1bb9839e8789c0a8da58c7423f5faa" resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-5.0.0-beta.1.tgz#c6a1185f39d3207f67753e7c486eddcefc7fd0da"
integrity sha512-lY7lYcR9fs+k468Cr9l5kZaH6+FAqc765teSsJrIAdr1fxnDPzZWxoSSqNc3a8mEg125c2NwOD8L+AYOGqMFiQ== integrity sha512-ADotpiMkIzHLy/ufK0q49V9hgF8oKE0rLRzVZV2dHBpmFR7YRcPdbb5AN9CiXDk6ol8nsocEEAwRmgD3eJG63w==
dependencies: dependencies:
"@abp/core" "~4.4.0-rc.1" "@abp/core" "~5.0.0-beta.1"
sweetalert "^2.1.2" sweetalert2 "^11.0.18"
"@abp/timeago@~4.4.0-rc.1": "@abp/timeago@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-4.4.0-rc.1.tgz#ba6c9c01727016b06e70eacfbc218bbe033b3a93" resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-5.0.0-beta.1.tgz#0f7bb8cd85b7e90d7d5c0a0940b9102e3f4f1e42"
integrity sha512-fxRMdYrnZTC2FbBXJfX5nlKVILXFmxRdZ4PW+DhSolsDSG2FR3yesbqS2SWoLuGvr81oBIkXbECaf7S/oWA2Iw== integrity sha512-QwYZyeDRW+X8BGecBcK1SgsClVWNYfPgvct+WkQhTIRxzbP/c1c+1irj69sNdN3df2WLnmjfu3sBw2hzz5ykbg==
dependencies: dependencies:
"@abp/jquery" "~4.4.0-rc.1" "@abp/jquery" "~5.0.0-beta.1"
timeago "^1.6.7" timeago "^1.6.7"
"@abp/toastr@~4.4.0-rc.1": "@abp/toastr@~5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-4.4.0-rc.1.tgz#a559665b3516f0f1eaba1c2b6fdd91d47cf25b62" resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-5.0.0-beta.1.tgz#d420fc5db6b15f6d623d3928bb6913996511937f"
integrity sha512-7BUywNmL/hXzR4hpcQejcA9YMsLGRisqdOTpZy7abkD4wicuchHy1tr9cBSLbDIgA8oMIqM9ubh3VvPoe6pl4A== integrity sha512-82LfDrZQagtv4QLb643VTra4pxleOq5xYwhpOK1Ifop2K5CRgElxKfWvY2EtxdGkpCO2arvkOzjRNbxnecHB2w==
dependencies: dependencies:
"@abp/jquery" "~4.4.0-rc.1" "@abp/jquery" "~5.0.0-beta.1"
toastr "^2.1.4" toastr "^2.1.4"
"@abp/utils@^4.4.0-rc.1": "@abp/utils@^5.0.0-beta.1":
version "4.4.0-rc.1" version "5.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.4.0-rc.1.tgz#704764e60aae7beec2fc3ac9fff6217c1c70ddf6" resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-5.0.0-beta.1.tgz#e1bf9240738276081c89a67073d9d85205fdf14c"
integrity sha512-HOmxzOKueogv5mZ6b7SLzBlANYmtL3R8XFypPTky98qYYYWktSxgDkEnyvpe20+yuxKkzVW7sf/swKWEt2onIQ== integrity sha512-suzKxHUautizxt5XdlJ8ONIaVMcAHrb2dp1kEnXnFRW1ip+7ZQ9/nxJj+GtY1MhHX2yPmlUQP2K8f2upJh9aoA==
dependencies: dependencies:
just-compare "^1.3.0" just-compare "^1.3.0"
@ -777,11 +777,6 @@ es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3:
es5-ext "^0.10.35" es5-ext "^0.10.35"
es6-symbol "^3.1.1" es6-symbol "^3.1.1"
es6-object-assign@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"
integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=
es6-symbol@^3.1.1, es6-symbol@~3.1.1: es6-symbol@^3.1.1, es6-symbol@~3.1.1:
version "3.1.1" version "3.1.1"
resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
@ -2054,11 +2049,6 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==
promise-polyfill@^6.0.2:
version "6.1.0"
resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057"
integrity sha1-36lpQ+qcEh/KTem1hoyznTRy4Fc=
pump@^2.0.0: pump@^2.0.0:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"
@ -2474,13 +2464,10 @@ sver-compat@^1.5.0:
es6-iterator "^2.0.1" es6-iterator "^2.0.1"
es6-symbol "^3.1.1" es6-symbol "^3.1.1"
sweetalert@^2.1.2: sweetalert2@^11.0.18:
version "2.1.2" version "11.1.7"
resolved "https://registry.yarnpkg.com/sweetalert/-/sweetalert-2.1.2.tgz#010baaa80d0dbdc86f96bfcaa96b490728594b79" resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.1.7.tgz#0ff2851eae77a76a3fe0ab289d3c32493e811b6d"
integrity sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA== integrity sha512-7MHQVtKCTORfA9e58g9ZOfT3X58DkSBtvoCQJnqSHobXXb5C7aB8Yg/tAccTFnefCUBU41PoStjXMkzG3bNeig==
dependencies:
es6-object-assign "^1.1.0"
promise-polyfill "^6.0.2"
tar@^4: tar@^4:
version "4.4.10" version "4.4.10"

8
src/EventHub.Web.Theme/EventHub.Web.Theme.csproj

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
@ -30,12 +30,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="4.4.0-rc.1" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="5.0.0-beta.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.*" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.1.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

36
src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml

@ -13,7 +13,7 @@
EventHub EventHub
</a> </a>
</div> </div>
<div class="col-md"> <div class="col-md">
@if (!CurrentUser.IsAuthenticated) @if (!CurrentUser.IsAuthenticated)
{ {
@ -45,23 +45,23 @@
</div> </div>
</div> </div>
</div> </div>
</footer> <div class="footer-bottom">
<footer class="footer-bottom"> <div class="container">
<div class="container"> <div class="row">
<div class="row"> <div class="col-md-auto">
<div class="col-md-auto"> <span class="copyright">© 2021 EventHub</span>
<span class="copyright">© 2021 EventHub</span> </div>
</div> <div class="col-md text-center text-md-right">
<div class="col-md text-center text-md-right"> <a href="@UrlOptions.Value.Www/terms-service">
<a href="@UrlOptions.Value.Www/terms-service"> Terms of Service
Terms of Service </a>
</a> <span>
<span> <img src="/assets/seperator2.svg" class="mx-3">
<img src="/assets/seperator2.svg" class="mx-3"> </span>
</span> <a href="@UrlOptions.Value.Www/privacy-policy">
<a href="@UrlOptions.Value.Www/privacy-policy"> Privacy Policy
Privacy Policy </a>
</a> </div>
</div> </div>
</div> </div>
</div> </div>

18
src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml

@ -20,7 +20,7 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light static-top"> <nav class="navbar navbar-expand-lg navbar-light bg-light static-top">
<div class="container"> <div class="container">
<a class="navbar-brand font-weight-bold" href="@Url.Page("/index")"> <a class="navbar-brand font-weight-bold" href="@Url.Page("/index")">
<img src="/assets/eventhub-logo.svg" class="logo" /> <img src="/assets/eventhub-logo.svg" class="logo"/>
</a> </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@ -43,9 +43,18 @@
{ {
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link event-link" href="@UrlOptions.Value.Www@Url.Page("/events/new")">+ Create an Event</a> <div class="dropdown">
<a class="nav-link event-link" type="button" id="createDropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Create
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="@UrlOptions.Value.Www@Url.Page("/organizations/new")">Organization</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="@UrlOptions.Value.Www@Url.Page("/events/new")">Event</a>
</div>
</div>
</li> </li>
</ul> </ul>
} }
<ul class="navbar-nav"> <ul class="navbar-nav">
@ -97,13 +106,14 @@
</nav> </nav>
@functions{ @functions{
public string GetPageActiveClassOrEmpty(ViewContext viewContext, string pageUrl) public string GetPageActiveClassOrEmpty(ViewContext viewContext, string pageUrl)
{ {
if (!UrlOptions.Value.Www.Contains(Context.Request.Host.ToString())) if (!UrlOptions.Value.Www.Contains(Context.Request.Host.ToString()))
{ {
return ""; return "";
} }
var activeRoute = viewContext?.RouteData.Values["page"]?.ToString()?.ToLowerInvariant(); var activeRoute = viewContext?.RouteData.Values["page"]?.ToString()?.ToLowerInvariant();
pageUrl = pageUrl.ToLowerInvariant(); pageUrl = pageUrl.ToLowerInvariant();

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save