Compare commits
127 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
233c9b7502 | ||
|
|
12f046f262 | ||
|
|
d0cccde53f | ||
|
|
1d15c44a3d | ||
|
|
bade0bab98 | ||
|
|
c204eef755 | ||
|
|
27e65f05f0 | ||
|
|
64084679e8 | ||
|
|
2f1b9d4e77 | ||
|
|
1c472a7d9a | ||
|
|
119c3650f0 | ||
|
|
ebab6ea114 | ||
|
|
975bc8dd6c | ||
|
|
97a2a4b38d | ||
|
|
20e7fae481 | ||
|
|
6a5881960f | ||
|
|
37d3065ed7 | ||
|
|
648a63d618 | ||
|
|
197c4e0741 | ||
|
|
921c3c6d35 | ||
|
|
f56eccee55 | ||
|
|
fd5364ff97 | ||
|
|
a9e1a15183 | ||
|
|
d161e0f4b9 | ||
|
|
f9c5910813 | ||
|
|
67286232da | ||
|
|
9875ba3041 | ||
|
|
daf0d51960 | ||
|
|
5e6d2f518b | ||
|
|
2df3e359c4 | ||
|
|
57dbb0d308 | ||
|
|
5806ff5f9f | ||
|
|
e1c808310d | ||
|
|
96f7091d46 | ||
|
|
300bc5ae88 | ||
|
|
f5b32d5a6b | ||
|
|
a3e66081e9 | ||
|
|
231860e85a | ||
|
|
96cd6dfd80 | ||
|
|
84b9f65107 | ||
|
|
0f30c4ad7c | ||
|
|
7d006e0d74 | ||
|
|
b38aabb5bd | ||
|
|
ef201fda13 | ||
|
|
bea5aabffa | ||
|
|
df575706fb | ||
|
|
0e95c7df7b | ||
|
|
277dbd907f | ||
|
|
8e61351ac0 | ||
|
|
d50c62cd1c | ||
|
|
0f5d44ceb0 | ||
|
|
01e19ef26f | ||
|
|
0b5eb3d978 | ||
|
|
e50a02bddc | ||
|
|
9da0b89b8a | ||
|
|
f02a0f8830 | ||
|
|
312f784e3e | ||
|
|
6ed1c2dabc | ||
|
|
6262baa6f1 | ||
|
|
8f3932bc6e | ||
|
|
cb77dd2109 | ||
|
|
73cb479e50 | ||
|
|
7b0f4acced | ||
|
|
49d82d6123 | ||
|
|
85fee9c067 | ||
|
|
9a49f4df0f | ||
|
|
08a2297a66 | ||
|
|
549bb1aa76 | ||
|
|
6dd3cc4c32 | ||
|
|
efdba93e32 | ||
|
|
9afa9edb98 | ||
|
|
48acf4211d | ||
|
|
f62d4b1a74 | ||
|
|
a891beca3a | ||
|
|
49b8506f59 | ||
|
|
b6e4eee402 | ||
|
|
3f44b23f57 | ||
|
|
66037bf001 | ||
|
|
df9b6ff362 | ||
|
|
ffea9710e4 | ||
|
|
3eba44072c | ||
|
|
99d64e95f1 | ||
|
|
bc31e1f06a | ||
|
|
414006204e | ||
|
|
524a88274b | ||
|
|
8feab2184a | ||
|
|
96b78bd4b9 | ||
|
|
e4fe0d9cb7 | ||
|
|
4fd6d9627a | ||
|
|
7db239a5d4 | ||
|
|
e9d8f5ebac | ||
|
|
871ee34536 | ||
|
|
a70d8650f1 | ||
|
|
0554717bc6 | ||
|
|
cbd96fd8f2 | ||
|
|
bdc7f744aa | ||
|
|
6fa266f23e | ||
|
|
c97e7c4afa | ||
|
|
d81ca4cd2f | ||
|
|
ab656ba070 | ||
|
|
bc192a584b | ||
|
|
3219265c12 | ||
|
|
10404ab63a | ||
|
|
a3f86a6fdc | ||
|
|
06558a1284 | ||
|
|
c350acbf2a | ||
|
|
0e102b3dfc | ||
|
|
4444fce93b | ||
|
|
31f632d16a | ||
|
|
183674afb9 | ||
|
|
61751a48c4 | ||
|
|
953b4e7d98 | ||
|
|
e01875b7c9 | ||
|
|
10bf95da66 | ||
|
|
8dda4498ef | ||
|
|
b2dfb04879 | ||
|
|
ea3e847490 | ||
|
|
444261ba39 | ||
|
|
d44555ad6a | ||
|
|
a72faa083c | ||
|
|
503c45282b | ||
|
|
009c1a8416 | ||
|
|
7bb154c936 | ||
|
|
f3a922a5a8 | ||
|
|
8280a681d1 | ||
|
|
054a23bc9d | ||
|
|
2037cfd6d7 |
627 changed files with 64165 additions and 12070 deletions
3
.github/instructions/ai.instructions.md
vendored
3
.github/instructions/ai.instructions.md
vendored
|
|
@ -101,7 +101,8 @@ Driven by:
|
|||
- ListForm
|
||||
- ListFormFields
|
||||
- ListFormCustomization (UserUiFilter, GridState, ServerJoin, ServerWhere)
|
||||
- ListFormImport and ListFormImportExecute
|
||||
- ListFormImport and ListFormImportLog
|
||||
- ListFormWorkflow
|
||||
- ListFormJsonRow operations
|
||||
|
||||
Capabilities:
|
||||
|
|
|
|||
6
.github/instructions/list.instructions.md
vendored
6
.github/instructions/list.instructions.md
vendored
|
|
@ -49,7 +49,7 @@ This document summarizes the rules, standards, and step-by-step instructions for
|
|||
- **Created** new seeder file for {Modul}.
|
||||
- **Seeds** {Liste} list-form, referencing `{Modul}_T_{Entity}`.
|
||||
|
||||
### 5. SqlTables.sql
|
||||
### 5. SqlObjects.sql
|
||||
- **Renamed** {Liste} table to `{Modul}_T_{Entity}`.
|
||||
- **Updated** all related constraints and references.
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ Yeni bir modül ekle (ör: {Modul}):
|
|||
- MenusData.json'a kök menü olarak ekle
|
||||
- PermissionsData.json'da ayrı bir PermissionGroup oluştur
|
||||
- ListFormSeeder_{Modul}.cs dosyası oluştur ve list-form seed'ini buraya taşı
|
||||
- SqlTables.sql'de tabloyu {Modul}_T_{Entity} olarak adlandır
|
||||
- SqlObjects.sql'de tabloyu {Modul}_T_{Entity} olarak adlandır
|
||||
- LanguagesData.json'a menü, liste ve alan çevirilerini ekle
|
||||
```
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ Yeni bir modül ekle (ör: {Modul}):
|
|||
Yeni bir liste ekle (ör: {Liste}):
|
||||
- {Modul} ana menüsünün altına ekle
|
||||
- ListFormSeeder_{Modul}.cs dosyasına seed kodunu ekle
|
||||
- SqlTables.sql'de tabloyu {Modul}_T_{Entity} olarak oluştur
|
||||
- SqlObjects.sql'de tabloyu {Modul}_T_{Entity} olarak oluştur
|
||||
- PermissionsData.json'da ilgili izinleri {Modul} grubuna ekle
|
||||
- LanguagesData.json'a liste ve alan çevirilerini ekle
|
||||
```
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
|||
configs/**/data/**
|
||||
|
||||
*.bak
|
||||
**/node_modules
|
||||
**/.DS_Store
|
||||
logs/
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
"isRoot": true,
|
||||
"tools": {
|
||||
"volo.abp.cli": {
|
||||
"version": "9.0.2",
|
||||
"version": "10.0.0",
|
||||
"commands": [
|
||||
"abp"
|
||||
]
|
||||
|
|
|
|||
5
api/.gitignore
vendored
5
api/.gitignore
vendored
|
|
@ -268,3 +268,8 @@ src/Sozsoft.Platform.Blazor.Server.Tiered/Logs/*
|
|||
# DevExpress License - DO NOT commit to repository
|
||||
**/DevExpress_License.txt
|
||||
DevExpress_License.txt
|
||||
|
||||
# Local cache files
|
||||
*.lscache
|
||||
lscache/
|
||||
**/lscache/
|
||||
5
api/Directory.Build.props
Normal file
5
api/Directory.Build.props
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<NoWarn>$(NoWarn);CS0162;CS8321;CS8618;CS8632</NoWarn>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -1,7 +1,13 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
||||
ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false
|
||||
WORKDIR /app
|
||||
|
||||
COPY global.json ./
|
||||
COPY common.props ./
|
||||
COPY "modules/Sozsoft.Languages/common.props" "modules/Sozsoft.Languages/"
|
||||
COPY "modules/Sozsoft.Notifications/common.props" "modules/Sozsoft.Notifications/"
|
||||
COPY "modules/Sozsoft.Settings/common.props" "modules/Sozsoft.Settings/"
|
||||
COPY "modules/Sozsoft.SqlQueryManager/common.props" "modules/Sozsoft.SqlQueryManager/"
|
||||
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.Application.Contracts/Sozsoft.Languages.Application.Contracts.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.Application.Contracts/"
|
||||
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.Domain/Sozsoft.Languages.Domain.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.Domain/"
|
||||
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.Domain.Shared/Sozsoft.Languages.Domain.Shared.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.Domain.Shared/"
|
||||
|
|
@ -30,7 +36,7 @@ RUN dotnet restore "src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.
|
|||
COPY . .
|
||||
RUN dotnet publish "src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj" -c Release -o /app/publish --no-restore
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
|
||||
|
||||
# DevExpress License Key - runtime'da da gerekli
|
||||
ARG DevExpress_License
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
||||
ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false
|
||||
WORKDIR /app
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add nodejs~=24 npm~=11
|
||||
|
||||
COPY global.json ./
|
||||
COPY common.props ./
|
||||
COPY "modules/Sozsoft.Languages/common.props" "modules/Sozsoft.Languages/"
|
||||
COPY "modules/Sozsoft.Notifications/common.props" "modules/Sozsoft.Notifications/"
|
||||
COPY "modules/Sozsoft.Settings/common.props" "modules/Sozsoft.Settings/"
|
||||
COPY "modules/Sozsoft.SqlQueryManager/common.props" "modules/Sozsoft.SqlQueryManager/"
|
||||
COPY .config/dotnet-tools.json .config/dotnet-tools.json
|
||||
RUN dotnet tool restore
|
||||
ENV PATH="/root/.dotnet/tools:/app/.config/dotnet/tools:${PATH}"
|
||||
|
|
@ -54,7 +60,7 @@ RUN mkdir -p publish
|
|||
RUN dotnet publish "src/Sozsoft.Platform.HttpApi.Host/Sozsoft.Platform.HttpApi.Host.csproj" -c Release -o /app/publish --no-restore
|
||||
RUN dotnet publish "src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj" -c Release -o /app/migrator
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
|
||||
|
||||
# DevExpress License Key - runtime'da da gerekli
|
||||
ARG DevExpress_License
|
||||
|
|
@ -75,6 +81,7 @@ RUN mkdir -p $HOME/.config/DevExpress && \
|
|||
# fontconfig ve fonts-* DevExpress reporting için gerekli
|
||||
RUN apk update
|
||||
RUN apk add --no-cache \
|
||||
tzdata \
|
||||
icu-data-full \
|
||||
icu-libs \
|
||||
libgdiplus \
|
||||
|
|
|
|||
|
|
@ -16,4 +16,10 @@
|
|||
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "9.0.101",
|
||||
"version": "10.0.300",
|
||||
"rollForward": "latestMajor"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos;
|
|||
|
||||
namespace Sozsoft.Languages;
|
||||
|
||||
public class LanguageDto : FullAuditedEntityDto<Guid>
|
||||
public class LanguageDto : EntityDto<Guid>
|
||||
{
|
||||
[Required]
|
||||
public string CultureName { get; set; }
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Volo.Abp.Application.Dtos;
|
|||
|
||||
namespace Sozsoft.Languages;
|
||||
|
||||
public class LanguageKeyDto : FullAuditedEntityDto<Guid>
|
||||
public class LanguageKeyDto : EntityDto<Guid>
|
||||
{
|
||||
[Required]
|
||||
public string Key { get; set; }
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos;
|
|||
|
||||
namespace Sozsoft.Languages;
|
||||
|
||||
public class LanguageTextDto : FullAuditedEntityDto<Guid>
|
||||
public class LanguageTextDto : EntityDto<Guid>
|
||||
{
|
||||
public string CultureName { get; set; }
|
||||
public string ResourceName { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using Sozsoft.Languages.Localization;
|
||||
using Volo.Abp.Authorization.Permissions;
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace Sozsoft.Languages.Permissions;
|
||||
|
||||
|
|
@ -8,12 +6,5 @@ public class LanguagesPermissionDefinitionProvider : PermissionDefinitionProvide
|
|||
{
|
||||
public override void Define(IPermissionDefinitionContext context)
|
||||
{
|
||||
var myGroup = context.AddGroup(LanguagesPermissions.GroupName, L("Permission:Languages"));
|
||||
}
|
||||
|
||||
private static LocalizableString L(string name)
|
||||
{
|
||||
return LocalizableString.Create<LanguagesResource>(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Languages</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Languages.Domain.Shared\Sozsoft.Languages.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
using AutoMapper;
|
||||
using Sozsoft.Languages.Entities;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace Sozsoft.Languages;
|
||||
|
||||
public class LanguagesApplicationAutoMapperProfile : Profile
|
||||
{
|
||||
public LanguagesApplicationAutoMapperProfile()
|
||||
{
|
||||
CreateMap<Language, LanguageInfo>();
|
||||
CreateMap<Language, LanguageDto>();
|
||||
CreateMap<LanguageKey, LanguageKeyDto>();
|
||||
CreateMap<LanguageText, LanguageTextDto>();
|
||||
CreateMap<LanguageText, LanguageTextEto>();
|
||||
|
||||
CreateMap<LanguageTextCreateUpdateDto, LanguageText>()
|
||||
.IgnoreAllPropertiesWithAnInaccessibleSetter()
|
||||
.IgnoreFullAuditedObjectProperties()
|
||||
.ForMember(dest => dest.LanguageKey, opt => opt.Ignore());
|
||||
|
||||
CreateMap<LanguageKey, LanguageTextTranslatedDto>()
|
||||
.ForMember(d => d.Key, o => o.MapFrom(s => s.Key))
|
||||
.ForMember(d => d.ResourceName, o => o.MapFrom(s => s.ResourceName))
|
||||
.ForAllMembers(o => o.Ignore());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
using Sozsoft.Languages.Entities;
|
||||
using Volo.Abp.Localization;
|
||||
using Riok.Mapperly.Abstractions;
|
||||
using Volo.Abp.Mapperly;
|
||||
|
||||
namespace Sozsoft.Languages;
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageToLanguageInfoMapper : MapperBase<Language, LanguageInfo>
|
||||
{
|
||||
public override partial LanguageInfo Map(Language source);
|
||||
|
||||
public override partial void Map(Language source, LanguageInfo destination);
|
||||
|
||||
public override void BeforeMap(Language source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(Language source, LanguageInfo destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageToLanguageDtoMapper : MapperBase<Language, LanguageDto>
|
||||
{
|
||||
public override partial LanguageDto Map(Language source);
|
||||
|
||||
public override partial void Map(Language source, LanguageDto destination);
|
||||
|
||||
public override void BeforeMap(Language source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(Language source, LanguageDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageKeyToLanguageKeyDtoMapper : MapperBase<LanguageKey, LanguageKeyDto>
|
||||
{
|
||||
public override partial LanguageKeyDto Map(LanguageKey source);
|
||||
|
||||
public override partial void Map(LanguageKey source, LanguageKeyDto destination);
|
||||
|
||||
public override void BeforeMap(LanguageKey source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(LanguageKey source, LanguageKeyDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageTextToLanguageTextDtoMapper : MapperBase<LanguageText, LanguageTextDto>
|
||||
{
|
||||
public override partial LanguageTextDto Map(LanguageText source);
|
||||
|
||||
public override partial void Map(LanguageText source, LanguageTextDto destination);
|
||||
|
||||
public override void BeforeMap(LanguageText source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(LanguageText source, LanguageTextDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageTextToLanguageTextEtoMapper : MapperBase<LanguageText, LanguageTextEto>
|
||||
{
|
||||
public override partial LanguageTextEto Map(LanguageText source);
|
||||
|
||||
public override partial void Map(LanguageText source, LanguageTextEto destination);
|
||||
|
||||
public override void BeforeMap(LanguageText source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(LanguageText source, LanguageTextEto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageTextCreateUpdateDtoToLanguageTextMapper : MapperBase<LanguageTextCreateUpdateDto, LanguageText>
|
||||
{
|
||||
[MapperIgnoreTarget(nameof(LanguageText.LanguageKey))]
|
||||
public override partial LanguageText Map(LanguageTextCreateUpdateDto source);
|
||||
|
||||
[MapperIgnoreTarget(nameof(LanguageText.LanguageKey))]
|
||||
public override partial void Map(LanguageTextCreateUpdateDto source, LanguageText destination);
|
||||
|
||||
public override void BeforeMap(LanguageTextCreateUpdateDto source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(LanguageTextCreateUpdateDto source, LanguageText destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class LanguageKeyToLanguageTextTranslatedDtoMapper : MapperBase<LanguageKey, LanguageTextTranslatedDto>
|
||||
{
|
||||
[MapperIgnoreTarget(nameof(LanguageTextTranslatedDto.Id))]
|
||||
public override partial LanguageTextTranslatedDto Map(LanguageKey source);
|
||||
|
||||
[MapperIgnoreTarget(nameof(LanguageTextTranslatedDto.Id))]
|
||||
public override partial void Map(LanguageKey source, LanguageTextTranslatedDto destination);
|
||||
|
||||
public override void BeforeMap(LanguageKey source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(LanguageKey source, LanguageTextTranslatedDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Application;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Mapperly;
|
||||
using Volo.Abp.Modularity;
|
||||
|
||||
namespace Sozsoft.Languages;
|
||||
|
|
@ -9,18 +9,13 @@ namespace Sozsoft.Languages;
|
|||
typeof(LanguagesDomainModule),
|
||||
typeof(LanguagesApplicationContractsModule),
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpAutoMapperModule)
|
||||
typeof(AbpMapperlyModule)
|
||||
)]
|
||||
public class LanguagesApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddAutoMapperObjectMapper<LanguagesApplicationModule>();
|
||||
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<LanguagesApplicationModule>(validate: true);
|
||||
});
|
||||
context.Services.AddMapperlyObjectMapper<LanguagesApplicationModule>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Languages</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Mapperly" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Languages.Application.Contracts\Sozsoft.Languages.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Sozsoft.Languages.Domain\Sozsoft.Languages.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<GenerateEmbeddedFilesManifest>false</GenerateEmbeddedFilesManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
namespace Sozsoft.Languages.Entities;
|
||||
|
||||
public class Language : FullAuditedEntity<Guid>
|
||||
public class Language : Entity<Guid>
|
||||
{
|
||||
public string CultureName { get; set; }
|
||||
public string UiCultureName { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
namespace Sozsoft.Languages.Entities;
|
||||
|
||||
public class LanguageKey : FullAuditedEntity<Guid>
|
||||
public class LanguageKey : Entity<Guid>
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string ResourceName { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
namespace Sozsoft.Languages.Entities;
|
||||
|
||||
public class LanguageText : FullAuditedEntity<Guid>
|
||||
public class LanguageText : Entity<Guid>
|
||||
{
|
||||
public string CultureName { get; set; }
|
||||
public string? Key { get; set; }
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Languages</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Languages.Domain.Shared\Sozsoft.Languages.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Languages</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Languages.Domain\Sozsoft.Languages.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.5.3">
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.4.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.9.3">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
using AutoMapper;
|
||||
|
||||
namespace Sozsoft.MailQueue.Application;
|
||||
|
||||
public class MailQueueAutoMapperProfile : Profile
|
||||
{
|
||||
public MailQueueAutoMapperProfile()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
namespace Sozsoft.MailQueue.Application;
|
||||
|
|
@ -31,6 +31,8 @@ public class MailTrackingManager : DomainService
|
|||
/// <returns></returns>
|
||||
public async Task StartAsync()
|
||||
{
|
||||
// https://us-east-1.console.aws.amazon.com/iam/home?region=eu-central-1#/users
|
||||
// https://eu-central-1.console.aws.amazon.com/ses/home?region=eu-central-1#/identities/system%40sozsoft.com?tabId=authentication
|
||||
var accessKey = configuration.GetValue<string>(AmazonSesEmailSettingNames.AccessKey);
|
||||
var accessKeyId = configuration.GetValue<string>(AmazonSesEmailSettingNames.AccessKeyId);
|
||||
var region = configuration.GetValue<string>(AmazonSesEmailSettingNames.Region);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<NoWarn>$(NoWarn);CS8632</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -19,22 +18,25 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.TextTemplating.Razor" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Mapperly" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.TextTemplating.Razor" Version="10.0.0" />
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.SQS" Version="3.7.400" />
|
||||
<PackageReference Include="ClosedXML" Version="0.104.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.0" />
|
||||
<PackageReference Include="Wkhtmltopdf.NetCore" Version="3.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using Microsoft.CodeAnalysis;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Application;
|
||||
using Volo.Abp.Authorization;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Mapperly;
|
||||
using Volo.Abp.Domain;
|
||||
using Volo.Abp.EntityFrameworkCore;
|
||||
using Volo.Abp.Localization;
|
||||
|
|
@ -22,7 +22,7 @@ namespace Sozsoft.MailQueue;
|
|||
typeof(AbpDddDomainModule),
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpDddApplicationContractsModule),
|
||||
typeof(AbpAutoMapperModule),
|
||||
typeof(AbpMapperlyModule),
|
||||
typeof(AbpAuthorizationModule),
|
||||
typeof(AbpEntityFrameworkCoreModule),
|
||||
typeof(AbpTextTemplatingRazorModule),
|
||||
|
|
@ -32,11 +32,7 @@ public class ErpMailQueueModule : AbpModule
|
|||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddAutoMapperObjectMapper<ErpMailQueueModule>();
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<ErpMailQueueModule>(validate: true);
|
||||
});
|
||||
context.Services.AddMapperlyObjectMapper<ErpMailQueueModule>();
|
||||
|
||||
Configure<AbpLocalizationOptions>(options =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
namespace Sozsoft.Notifications.NotificationRules;
|
||||
using System;
|
||||
|
||||
namespace Sozsoft.Notifications.NotificationRules;
|
||||
|
||||
public class CreateUpdateNotificationRuleDto
|
||||
{
|
||||
public string Channel { get; set; }
|
||||
public string NotificationType { get; set; }
|
||||
public Guid NotificationTypeId { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ public interface INotificationRuleAppService : ICrudAppService<
|
|||
PagedAndSortedResultRequestDto,
|
||||
CreateUpdateNotificationRuleDto>
|
||||
{
|
||||
string[] GetNotificationTypes();
|
||||
Task<string[]> GetNotificationTypes();
|
||||
Task<string[]> GetMyNotificationTypesAsync();
|
||||
Task<List<NotificationRuleDto>> GetMyNotificationRules();
|
||||
Task PostMyNotificationRule(CreateUpdateNotificationRuleDto Input);
|
||||
Task DeleteMyNotificationRules(string NotificationType);
|
||||
|
||||
Task DeleteMyNotificationRules(Guid NotificationTypeId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Sozsoft.Notifications.NotificationRules;
|
|||
|
||||
public class NotificationRuleDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public string? NotificationType { get; set; }
|
||||
public Guid? NotificationTypeId { get; set; }
|
||||
public string? RecipientType { get; set; }
|
||||
public string? RecipientId { get; set; } //UserId, RoleId, OrganizationUnitId
|
||||
public string? Channel { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Sozsoft.Notifications.NotificationRules;
|
||||
|
||||
public class NotificationTypeDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
using Sozsoft.Notifications.Localization;
|
||||
using Volo.Abp.Authorization.Permissions;
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace Sozsoft.Notifications.Permissions;
|
||||
|
||||
|
|
@ -8,12 +6,5 @@ public class NotificationPermissionDefinitionProvider : PermissionDefinitionProv
|
|||
{
|
||||
public override void Define(IPermissionDefinitionContext context)
|
||||
{
|
||||
var myGroup = context.AddGroup(NotificationPermissions.GroupName, L("Permission:Notifications"));
|
||||
}
|
||||
|
||||
private static LocalizableString L(string name)
|
||||
{
|
||||
return LocalizableString.Create<NotificationResource>(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Sozsoft.Notifications</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Notifications.Domain.Shared\Sozsoft.Notifications.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ public class NotificationAppService : ReadOnlyAppService<
|
|||
|
||||
public async Task CreateNotificationByNotificationRuleIdAsync(NotificationRequestDto input)
|
||||
{
|
||||
var notificationRule = await repositoryRule.GetAsync(input.Id);
|
||||
var notificationRule = await repositoryRule.GetAsync(input.Id, true);
|
||||
if (notificationRule != null)
|
||||
{
|
||||
await notificationManager.SendNotificationAsync(notificationRule.NotificationType, input.Message);
|
||||
await notificationManager.SendNotificationAsync(notificationRule.NotificationTypeId, input.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
using AutoMapper;
|
||||
using Sozsoft.Notifications.Entities;
|
||||
using Sozsoft.Notifications.NotificationRules;
|
||||
|
||||
namespace Sozsoft.Notifications.Application;
|
||||
|
||||
public class NotificationApplicationAutoMapperProfile : Profile
|
||||
{
|
||||
public NotificationApplicationAutoMapperProfile()
|
||||
{
|
||||
CreateMap<NotificationRule, NotificationRuleDto>();
|
||||
CreateMap<Notification, NotificationDto>()
|
||||
.ForMember(d => d.CreatorFullname, o => o.Ignore())
|
||||
.ForMember(d => d.TenantId, o => o.Ignore());
|
||||
CreateMap<CreateUpdateNotificationRuleDto, NotificationRule>(MemberList.Source);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
using Sozsoft.Notifications.Entities;
|
||||
using Sozsoft.Notifications.Domain;
|
||||
using Sozsoft.Notifications.NotificationRules;
|
||||
using Riok.Mapperly.Abstractions;
|
||||
using Volo.Abp.Mapperly;
|
||||
|
||||
namespace Sozsoft.Notifications.Application;
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class NotificationTypeToNotificationTypeDtoMapper : MapperBase<NotificationType, NotificationTypeDto>
|
||||
{
|
||||
public override partial NotificationTypeDto Map(NotificationType source);
|
||||
|
||||
public override partial void Map(NotificationType source, NotificationTypeDto destination);
|
||||
|
||||
public override void BeforeMap(NotificationType source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(NotificationType source, NotificationTypeDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class NotificationRuleToNotificationRuleDtoMapper : MapperBase<NotificationRule, NotificationRuleDto>
|
||||
{
|
||||
public override partial NotificationRuleDto Map(NotificationRule source);
|
||||
|
||||
public override partial void Map(NotificationRule source, NotificationRuleDto destination);
|
||||
|
||||
public override void BeforeMap(NotificationRule source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(NotificationRule source, NotificationRuleDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class NotificationToNotificationDtoMapper : MapperBase<Notification, NotificationDto>
|
||||
{
|
||||
[MapperIgnoreTarget(nameof(NotificationDto.CreatorFullname))]
|
||||
[MapperIgnoreTarget(nameof(NotificationDto.TenantId))]
|
||||
public override partial NotificationDto Map(Notification source);
|
||||
|
||||
[MapperIgnoreTarget(nameof(NotificationDto.CreatorFullname))]
|
||||
[MapperIgnoreTarget(nameof(NotificationDto.TenantId))]
|
||||
public override partial void Map(Notification source, NotificationDto destination);
|
||||
|
||||
public override void BeforeMap(Notification source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(Notification source, NotificationDto destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class CreateUpdateNotificationRuleDtoToNotificationRuleMapper : MapperBase<CreateUpdateNotificationRuleDto, NotificationRule>
|
||||
{
|
||||
[MapperIgnoreTarget(nameof(NotificationRule.RecipientType))]
|
||||
public override NotificationRule Map(CreateUpdateNotificationRuleDto source)
|
||||
{
|
||||
var destination = new NotificationRule
|
||||
{
|
||||
RecipientType = NotificationRecipientTypes.All,
|
||||
Channel = source.Channel,
|
||||
NotificationTypeId = source.NotificationTypeId,
|
||||
IsActive = source.IsActive
|
||||
};
|
||||
|
||||
AfterMap(source, destination);
|
||||
|
||||
return destination;
|
||||
}
|
||||
|
||||
[MapperIgnoreTarget(nameof(NotificationRule.RecipientType))]
|
||||
public override partial void Map(CreateUpdateNotificationRuleDto source, NotificationRule destination);
|
||||
|
||||
public override void BeforeMap(CreateUpdateNotificationRuleDto source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(CreateUpdateNotificationRuleDto source, NotificationRule destination)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
using Sozsoft.Notifications.Domain;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Application;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Mapperly;
|
||||
using Volo.Abp.Modularity;
|
||||
|
||||
namespace Sozsoft.Notifications.Application;
|
||||
|
|
@ -10,17 +10,13 @@ namespace Sozsoft.Notifications.Application;
|
|||
typeof(NotificationDomainModule),
|
||||
typeof(NotificationApplicationContractsModule),
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpAutoMapperModule)
|
||||
typeof(AbpMapperlyModule)
|
||||
)]
|
||||
public class NotificationApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddAutoMapperObjectMapper<NotificationApplicationModule>();
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<NotificationApplicationModule>(validate: true);
|
||||
});
|
||||
context.Services.AddMapperlyObjectMapper<NotificationApplicationModule>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Sozsoft.Notifications.Domain;
|
||||
using Sozsoft.Notifications.Entities;
|
||||
using Sozsoft.Notifications.Enums;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
|
@ -23,25 +22,30 @@ public class NotificationRuleAppService : CrudAppService<
|
|||
CreateUpdateNotificationRuleDto>,
|
||||
INotificationRuleAppService
|
||||
{
|
||||
private readonly IRepository<NotificationType, Guid> repositoryType;
|
||||
private readonly IOrganizationUnitRepository repositoryOrganizationUnit;
|
||||
private readonly IdentityUserManager userManager;
|
||||
private readonly IIdentityUserRepository repositoryUser;
|
||||
private readonly IOrganizationUnitRepository repositoryOrganizationUnit;
|
||||
|
||||
public NotificationRuleAppService(
|
||||
IRepository<NotificationType, Guid> repositoryType,
|
||||
IRepository<NotificationRule, Guid> repository,
|
||||
IdentityUserManager userManager,
|
||||
IIdentityUserRepository repositoryUser,
|
||||
IOrganizationUnitRepository repositoryOrganizationUnit
|
||||
) : base(repository)
|
||||
{
|
||||
this.repositoryType = repositoryType;
|
||||
this.userManager = userManager;
|
||||
this.repositoryUser = repositoryUser;
|
||||
this.repositoryOrganizationUnit = repositoryOrganizationUnit;
|
||||
}
|
||||
|
||||
public string[] GetNotificationTypes()
|
||||
public async Task<string[]> GetNotificationTypes()
|
||||
{
|
||||
return NotificationTypes.GetAll();
|
||||
var types = await repositoryType.GetListAsync();
|
||||
|
||||
return types.Select(a => a.Name).ToArray();
|
||||
}
|
||||
|
||||
private void GetAllParentCodes(string code, List<string>? codes)
|
||||
|
|
@ -83,7 +87,8 @@ public class NotificationRuleAppService : CrudAppService<
|
|||
public async Task<string[]> GetMyNotificationTypesAsync()
|
||||
{
|
||||
var query = await CreateFilteredQueryAsync(new PagedAndSortedResultRequestDto());
|
||||
return await query.Select(a => a.NotificationType).Distinct().ToArrayAsync();
|
||||
|
||||
return await query.Select(a => a.NotificationType.Name).Distinct().ToArrayAsync();
|
||||
}
|
||||
|
||||
public async Task<List<NotificationRuleDto>> GetMyNotificationRules()
|
||||
|
|
@ -91,7 +96,7 @@ public class NotificationRuleAppService : CrudAppService<
|
|||
var query = await CreateFilteredQueryAsync(new PagedAndSortedResultRequestDto());
|
||||
var all = await query.ToListAsync();
|
||||
var list = all
|
||||
.GroupBy(a => new { a.NotificationType, a.Channel })
|
||||
.GroupBy(a => new { a.NotificationTypeId, a.Channel })
|
||||
.Select(a =>
|
||||
{
|
||||
var item = a.FirstOrDefault(a => a.IsFixed)
|
||||
|
|
@ -101,7 +106,7 @@ public class NotificationRuleAppService : CrudAppService<
|
|||
return new NotificationRuleDto
|
||||
{
|
||||
Id = item.Id,
|
||||
NotificationType = a.Key.NotificationType,
|
||||
NotificationTypeId = a.Key.NotificationTypeId,
|
||||
Channel = a.Key.Channel,
|
||||
IsActive = item.IsActive,
|
||||
IsFixed = item.IsFixed,
|
||||
|
|
@ -121,13 +126,13 @@ public class NotificationRuleAppService : CrudAppService<
|
|||
a.RecipientId == CurrentUser.UserName &&
|
||||
a.IsCustomized &&
|
||||
a.Channel == Input.Channel &&
|
||||
a.NotificationType == Input.NotificationType);
|
||||
a.NotificationTypeId == Input.NotificationTypeId);
|
||||
if (item is null)
|
||||
{
|
||||
// insert
|
||||
item = new NotificationRule
|
||||
{
|
||||
NotificationType = Input.NotificationType,
|
||||
NotificationTypeId = Input.NotificationTypeId,
|
||||
RecipientType = NotificationRecipientTypes.User,
|
||||
RecipientId = CurrentUser.UserName,
|
||||
Channel = Input.Channel,
|
||||
|
|
@ -144,51 +149,16 @@ public class NotificationRuleAppService : CrudAppService<
|
|||
}
|
||||
}
|
||||
|
||||
public async Task DeleteMyNotificationRules(string NotificationType)
|
||||
public async Task DeleteMyNotificationRules(Guid NotificationTypeId)
|
||||
{
|
||||
var query = await CreateFilteredQueryAsync(new PagedAndSortedResultRequestDto());
|
||||
var items = await query.Where(a =>
|
||||
a.RecipientType == NotificationRecipientTypes.User &&
|
||||
a.RecipientId == CurrentUser.UserName &&
|
||||
a.IsCustomized &&
|
||||
a.NotificationType == NotificationType)
|
||||
a.NotificationTypeId == NotificationTypeId)
|
||||
.ToListAsync();
|
||||
|
||||
await Repository.DeleteManyAsync(items);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
var defaultRules = await query.Where(a => !a.IsCustomized && a.IsActive)
|
||||
.GroupBy(a => new { a.NotificationType, a.Channel })
|
||||
.Select(a => new NotificationRuleDto
|
||||
{
|
||||
Id = a.FirstOrDefault(a => a.UserId != null)?.Id ?? a.First().Id,
|
||||
NotificationType = a.Key.NotificationType,
|
||||
Channel = a.Key.Channel,
|
||||
IsActive = a.First().IsActive,
|
||||
IsFixed = a.First().IsFixed,
|
||||
IsCustomized = a.First().IsCustomized,
|
||||
})
|
||||
.ToListAsync();
|
||||
var customizedRules = await query.Where(a => a.IsCustomized)
|
||||
.Select(a => new NotificationRuleDto
|
||||
{
|
||||
Id = a.Id,
|
||||
NotificationType = a.NotificationType,
|
||||
Channel = a.Channel,
|
||||
IsActive = a.IsActive,
|
||||
IsFixed = a.IsFixed,
|
||||
IsCustomized = a.IsCustomized
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
//defaultRules.IsFixed
|
||||
//customizedRules - defaultRules.IsFixed
|
||||
//!defaultRules.IsFixed - customizedRules
|
||||
var list = new List<NotificationRuleDto>();
|
||||
list.AddRange(defaultRules.Where(a => a.IsFixed).ToList());
|
||||
list.AddRange(customizedRules.Where(a => !list.Any(b => b.NotificationType == a.NotificationType && b.Channel == a.Channel)).ToList());
|
||||
list.AddRange(defaultRules.Where(a => !a.IsFixed && !list.Any(b => b.NotificationType == a.NotificationType && b.Channel == a.Channel)).ToList());
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Sozsoft.Notifications</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Mapperly" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Notifications.Application.Contracts\Sozsoft.Notifications.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Sozsoft.Notifications.Domain\Sozsoft.Notifications.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -2,13 +2,12 @@
|
|||
|
||||
public static class NotificationChannels
|
||||
{
|
||||
public const string Sms = "Sms";
|
||||
public const string Mail = "Mail";
|
||||
public const string Rocket = "Rocket";
|
||||
public const string Sms = "Sms"; //SMS (ABP Sms + Posta Guvercini)
|
||||
public const string Mail = "Mail"; //Email (ABP Emailing + Amazon SES)
|
||||
public const string Rocket = "Rocket"; //Rocket.Chat (HTTP API)
|
||||
public const string Desktop = "Desktop";
|
||||
public const string UiActivity = "UiActivity";
|
||||
public const string UiToast = "UiToast";
|
||||
public const string WhatsApp = "WhatsApp";
|
||||
public const string Telegram = "Telegram";
|
||||
public const string UiActivity = "UiActivity"; //UI Activity (ABP UI Activity)
|
||||
public const string UiToast = "UiToast"; //UI Toast (ABP UI Toast) Ayarlar/Sistem/Bildirimler/Chrome açık olması gerekiyor.
|
||||
public const string WhatsApp = "WhatsApp"; //WhatsApp (HTTP API, template-based)
|
||||
// public const string Telegram = "Telegram";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
using Volo.Abp.Reflection;
|
||||
|
||||
namespace Sozsoft.Notifications.Enums;
|
||||
|
||||
public static class NotificationTypes
|
||||
{
|
||||
// public const string SiparisPasla = "SiparisPasla";
|
||||
// public const string YeniSiparis = "YeniSiparis";
|
||||
// public const string YeniKullanici = "YeniKullanici";
|
||||
|
||||
public static string[] GetAll()
|
||||
{
|
||||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(NotificationTypes));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3,19 +3,19 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Sozsoft.Notifications</RootNamespace>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<GenerateEmbeddedFilesManifest>false</GenerateEmbeddedFilesManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
|
||||
namespace Sozsoft.Notifications.Entities;
|
||||
|
|
@ -7,7 +8,8 @@ public class Notification : FullAuditedEntity<Guid>
|
|||
{
|
||||
public Guid NotificationRuleId { get; set; }
|
||||
public required string NotificationChannel { get; set; }
|
||||
public required string NotificationType { get; set; }
|
||||
public required Guid NotificationTypeId { get; set; }
|
||||
public virtual NotificationType NotificationType { get; set; }
|
||||
|
||||
// Bildirim tipine göre bildirimi alacak olan hedef bilgisini içerir
|
||||
public required string Identifier { get; set; } //UserId, Email, PhoneNumber..
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ namespace Sozsoft.Notifications.Entities;
|
|||
|
||||
public class NotificationRule : FullAuditedEntity<Guid>
|
||||
{
|
||||
public required string NotificationType { get; set; }
|
||||
public required Guid NotificationTypeId { get; set; }
|
||||
public NotificationType NotificationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Alıcı Tipi: User, Role, Organization, All, Custom
|
||||
/// User ise RecipientId UserId olacak
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
|
||||
namespace Sozsoft.Notifications.Entities;
|
||||
|
||||
public class NotificationType : FullAuditedEntity<Guid>
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
|
||||
public virtual ICollection<NotificationRule> NotificationRules { get; set; } = [];
|
||||
public ICollection<Notification> Notifications { get; set; } = [];
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ public class NotificationIdentifierProvider : INotificationIdentifierProvider
|
|||
NotificationChannels.UiActivity => user.Id.ToString(),
|
||||
NotificationChannels.UiToast => user.Id.ToString(),
|
||||
NotificationChannels.WhatsApp => user.PhoneNumber,
|
||||
NotificationChannels.Telegram => user.PhoneNumber,
|
||||
// NotificationChannels.Telegram => user.PhoneNumber,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,13 @@ namespace Sozsoft.Notifications.Domain;
|
|||
|
||||
public interface INotificationManager : ITransientDependency
|
||||
{
|
||||
Task SendNotificationAsync(string NotificationType, string NotificationMessage);
|
||||
Task SendNotificationAsync(Guid NotificationTypeId, string NotificationMessage);
|
||||
Task SendNotificationAsync(string NotificationType, string NotificationChannel, string NotificationMessage, string Identifier, Guid? UserId = null);
|
||||
}
|
||||
|
||||
public class NotificationManager : INotificationManager
|
||||
{
|
||||
private readonly IReadOnlyRepository<NotificationType> repositoryType;
|
||||
private readonly IReadOnlyRepository<NotificationRule> repository;
|
||||
private readonly IReadOnlyRepository<IdentityUser> repositoryUser;
|
||||
private readonly IReadOnlyRepository<IdentityRole> repositoryRole;
|
||||
|
|
@ -28,6 +29,7 @@ public class NotificationManager : INotificationManager
|
|||
private readonly ICurrentUser currentUser;
|
||||
|
||||
public NotificationManager(
|
||||
IReadOnlyRepository<NotificationType> repositoryType,
|
||||
IReadOnlyRepository<NotificationRule> repository,
|
||||
IReadOnlyRepository<IdentityUser> repositoryUser,
|
||||
IReadOnlyRepository<IdentityRole> repositoryRole,
|
||||
|
|
@ -37,6 +39,7 @@ public class NotificationManager : INotificationManager
|
|||
ICurrentUser currentUser
|
||||
)
|
||||
{
|
||||
this.repositoryType = repositoryType;
|
||||
this.repository = repository;
|
||||
this.repositoryUser = repositoryUser;
|
||||
this.repositoryRole = repositoryRole;
|
||||
|
|
@ -46,9 +49,9 @@ public class NotificationManager : INotificationManager
|
|||
this.currentUser = currentUser;
|
||||
}
|
||||
|
||||
public async Task SendNotificationAsync(string NotificationType, string NotificationMessage)
|
||||
public async Task SendNotificationAsync(Guid NotificationTypeId, string NotificationMessage)
|
||||
{
|
||||
var list = await repository.GetListAsync(a => a.NotificationType == NotificationType);
|
||||
var list = await repository.GetListAsync(a => a.NotificationTypeId == NotificationTypeId);
|
||||
var notificationRules = list
|
||||
.GroupBy(a => new { a.NotificationType, a.Channel })
|
||||
.Select(a =>
|
||||
|
|
@ -110,11 +113,12 @@ public class NotificationManager : INotificationManager
|
|||
var notifications = new List<Notification>();
|
||||
|
||||
//Eğer "Custom" seçildiyse girilen RecipientId dinamik olabilir. Telefon Numarası, Email vs.
|
||||
if (notificationRule.RecipientType == NotificationRecipientTypes.Custom) {
|
||||
if (notificationRule.RecipientType == NotificationRecipientTypes.Custom)
|
||||
{
|
||||
var notification = new Notification
|
||||
{
|
||||
NotificationTypeId = notificationRule.NotificationTypeId,
|
||||
NotificationRuleId = notificationRule.Id,
|
||||
NotificationType = NotificationType,
|
||||
NotificationChannel = notificationRule.Channel,
|
||||
Identifier = notificationRule.RecipientId!,
|
||||
UserId = currentUser.Id,
|
||||
|
|
@ -124,7 +128,8 @@ public class NotificationManager : INotificationManager
|
|||
};
|
||||
notifications.Add(notification);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
if (userIds.IsNullOrEmpty())
|
||||
{
|
||||
continue;
|
||||
|
|
@ -142,8 +147,8 @@ public class NotificationManager : INotificationManager
|
|||
|
||||
var notification = new Notification
|
||||
{
|
||||
NotificationTypeId = notificationRule.NotificationTypeId,
|
||||
NotificationRuleId = notificationRule.Id,
|
||||
NotificationType = NotificationType,
|
||||
NotificationChannel = notificationRule.Channel,
|
||||
Identifier = identifier,
|
||||
UserId = userId,
|
||||
|
|
@ -163,7 +168,7 @@ public class NotificationManager : INotificationManager
|
|||
/// <summary>
|
||||
/// Belirtilen Ident
|
||||
/// </summary>
|
||||
/// <param name="NotificationType"></param>
|
||||
/// <param name="NotificationTypeId"></param>
|
||||
/// <param name="NotificationMessage"></param>
|
||||
/// <param name="Identifier"></param>
|
||||
/// <param name="UserId"></param>
|
||||
|
|
@ -187,9 +192,12 @@ public class NotificationManager : INotificationManager
|
|||
}
|
||||
}
|
||||
|
||||
var notificationType = await repositoryType.FirstOrDefaultAsync(a => a.Name == NotificationType)
|
||||
?? throw new Exception($"NotificationType '{NotificationType}' not found.");
|
||||
|
||||
await repositoryNotification.InsertAsync(new Notification
|
||||
{
|
||||
NotificationType = NotificationType,
|
||||
NotificationTypeId = notificationType.Id,
|
||||
NotificationChannel = NotificationChannel,
|
||||
Identifier = Identifier,
|
||||
UserId = UserId,
|
||||
|
|
|
|||
|
|
@ -3,16 +3,15 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Sozsoft.Notifications</RootNamespace>
|
||||
<NoWarn>$(NoWarn);CS8632</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Identity.Domain" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Identity.Domain" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Notifications.Domain.Shared\Sozsoft.Notifications.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public class NotificationDbContext : AbpDbContext<NotificationDbContext>, INotif
|
|||
/* Add DbSet for each Aggregate Root here. Example:
|
||||
* public DbSet<Question> Questions { get; set; }
|
||||
*/
|
||||
public DbSet<NotificationType> NotificationTypes { get; set; }
|
||||
public DbSet<NotificationRule> NotificationRules { get; set; }
|
||||
public DbSet<Notification> Notifications { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using Sozsoft.Notifications.Domain;
|
||||
using Sozsoft.Notifications.Entities;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Sozsoft.Notifications.Domain;
|
||||
using Sozsoft.Notifications.Entities;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.EntityFrameworkCore.Modeling;
|
||||
|
||||
|
|
@ -13,21 +14,29 @@ public static class NotificationDbContextModelCreatingExtensions
|
|||
{
|
||||
Check.NotNull(builder, nameof(builder));
|
||||
|
||||
builder.Entity<NotificationType>(b =>
|
||||
{
|
||||
b.ToTable(TablePrefix.ByName(nameof(NotificationType)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
||||
});
|
||||
|
||||
builder.Entity<NotificationRule>(b =>
|
||||
{
|
||||
b.ToTable(TablePrefix.ByName(nameof(NotificationRule)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.NotificationType).IsRequired().HasMaxLength(128);
|
||||
b.Property(x => x.NotificationTypeId).IsRequired();
|
||||
|
||||
b.Property(x => x.RecipientType).IsRequired().HasMaxLength(64);
|
||||
b.Property(x => x.RecipientId).HasMaxLength(256);
|
||||
b.Property(x => x.Channel).IsRequired().HasMaxLength(64);
|
||||
|
||||
// 1:N ilişki NotificationRule -> Notifications
|
||||
b.HasMany(x => x.Notifications)
|
||||
.WithOne(x => x.NotificationRule)
|
||||
.HasForeignKey(x => x.NotificationRuleId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
b.HasOne(x => x.NotificationType)
|
||||
.WithMany(x => x.NotificationRules)
|
||||
.HasForeignKey(x => x.NotificationTypeId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<Notification>(b =>
|
||||
|
|
@ -35,10 +44,17 @@ public static class NotificationDbContextModelCreatingExtensions
|
|||
b.ToTable(TablePrefix.ByName(nameof(Notification)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.NotificationTypeId).IsRequired();
|
||||
b.Property(x => x.NotificationRuleId).IsRequired();
|
||||
|
||||
b.Property(x => x.NotificationChannel).IsRequired().HasMaxLength(64);
|
||||
b.Property(x => x.NotificationType).IsRequired().HasMaxLength(128);
|
||||
b.Property(x => x.Identifier).IsRequired().HasMaxLength(256);
|
||||
b.Property(x => x.Message).IsRequired().HasMaxLength(2048);
|
||||
|
||||
b.HasOne(x => x.NotificationType)
|
||||
.WithMany(x => x.Notifications)
|
||||
.HasForeignKey(x => x.NotificationTypeId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>Sozsoft.Notifications</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Notifications.Domain\Sozsoft.Notifications.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.5.3">
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.4.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.9.3">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public class AmazonSesEmailSender : EmailSenderBase, ISozsoftEmailSender, ITrans
|
|||
await BackgroundJobManager.EnqueueAsync(
|
||||
new ErpBackgroundEmailSendingJobArgs
|
||||
{
|
||||
TenantId = CurrentTenant.Id,
|
||||
To = to,
|
||||
Sender = sender,
|
||||
Params = @params,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using Volo.Abp.BackgroundJobs;
|
||||
using Volo.Abp.BackgroundJobs;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Sozsoft.Sender.Mail;
|
||||
|
||||
|
|
@ -7,22 +8,28 @@ public class ErpBackgroundEmailSendingJob :
|
|||
AsyncBackgroundJob<ErpBackgroundEmailSendingJobArgs>, ITransientDependency
|
||||
{
|
||||
protected ISozsoftEmailSender EmailSender { get; }
|
||||
protected ICurrentTenant CurrentTenant { get; }
|
||||
|
||||
public ErpBackgroundEmailSendingJob(ISozsoftEmailSender emailSender)
|
||||
public ErpBackgroundEmailSendingJob(
|
||||
ISozsoftEmailSender emailSender,
|
||||
ICurrentTenant currentTenant)
|
||||
{
|
||||
EmailSender = emailSender;
|
||||
CurrentTenant = currentTenant;
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(ErpBackgroundEmailSendingJobArgs args)
|
||||
{
|
||||
//await EmailSender.SendEmailAsync(args.Template, args.To, args.Params, args.Subject);
|
||||
await EmailSender.SendEmailAsync(
|
||||
args.To,
|
||||
args.Sender,
|
||||
args.Params,
|
||||
args.TextContent,
|
||||
args.Subject,
|
||||
args.Attachments);
|
||||
using (CurrentTenant.Change(args.TenantId))
|
||||
{
|
||||
//await EmailSender.SendEmailAsync(args.Template, args.To, args.Params, args.Subject);
|
||||
await EmailSender.SendEmailAsync(
|
||||
args.To,
|
||||
args.Sender,
|
||||
args.Params,
|
||||
args.TextContent,
|
||||
args.Subject,
|
||||
args.Attachments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
namespace Sozsoft.Sender.Mail;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Sozsoft.Sender.Mail;
|
||||
|
||||
[Serializable]
|
||||
public class ErpBackgroundEmailSendingJobArgs
|
||||
public class ErpBackgroundEmailSendingJobArgs : IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string[] To { get; set; }
|
||||
|
||||
public KeyValuePair<string, string>? Sender { get; set; }
|
||||
|
|
@ -14,6 +18,4 @@ public class ErpBackgroundEmailSendingJobArgs
|
|||
public Dictionary<string, string>? Attachments { get; set; }
|
||||
|
||||
public string? TextContent { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,15 +17,15 @@ public class RocketSender : ISozsoftRocketSender
|
|||
|
||||
public async Task<RocketSendResult> SendAsync(string Username, string Message)
|
||||
{
|
||||
logger.LogInformation("Rocket gönderiliyor. {Username}, {Message}", Username, Message);
|
||||
logger.LogInformation("Sending Rocket message. {Username}, {Message}", Username, Message);
|
||||
var result = await httpClient.SendMessageAsync(Username, Message);
|
||||
if (result.Success)
|
||||
{
|
||||
logger.LogInformation("Rocket gönderildi. {Username}, {Message}", Username, Message);
|
||||
logger.LogInformation("Rocket sent successfully. {Username}, {Message}", Username, Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning("Rocket gönderilemedi. {Username}, {Message}", Username, Message);
|
||||
logger.LogWarning("Failed to send Rocket message. {Username}, {Message}", Username, Message);
|
||||
}
|
||||
|
||||
return new RocketSendResult
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ public class PostaGuverciniSmsSender : ISozsoftSmsSender
|
|||
Message = Check.NotNullOrWhiteSpace(Message, nameof(Message));
|
||||
PhoneNumber = PhoneNumber.StartsWith('0') ? PhoneNumber[1..] : PhoneNumber;
|
||||
|
||||
logger.LogInformation("Sms gönderiliyor. {PhoneNumber}, {Message}", PhoneNumber, Message);
|
||||
logger.LogInformation("Sending SMS message. {PhoneNumber}, {Message}", PhoneNumber, Message);
|
||||
var result = await httpClient.SendSmsAsync(PhoneNumber, Message);
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
logger.LogInformation("Sms gönderildi. {PhoneNumber}, {Message}", PhoneNumber, Message);
|
||||
logger.LogInformation("SMS sent successfully. {PhoneNumber}, {Message}", PhoneNumber, Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning("Sms gönderilemedi. {PhoneNumber}, {Message}, {Error}", PhoneNumber, Message, $"{result.ErrNo}:{result.ErrText}");
|
||||
logger.LogWarning("Failed to send SMS message. {PhoneNumber}, {Message}, {Error}", PhoneNumber, Message, $"{result.ErrNo}:{result.ErrText}");
|
||||
}
|
||||
|
||||
return new SmsSendResult
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.SimpleEmailV2" Version="3.7.406" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Emailing" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.MailKit" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Sms" Version="9.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Emailing" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.MailKit" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Sms" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.0" />
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -23,16 +23,16 @@ public class SozsoftWhatsAppSender : ISozsoftWhatsAppSender
|
|||
|
||||
public async Task<WhatsAppSendResult> SendAsync(string To, string Message, string LanguageCode = "tr")
|
||||
{
|
||||
logger.LogInformation("WhatsApp gönderiliyor. {To}, {LanguageCode}, {Message}", To, LanguageCode, Message);
|
||||
logger.LogInformation("Sending WhatsApp message. {To}, {LanguageCode}, {Message}", To, LanguageCode, Message);
|
||||
var result = await httpClient.SendMessageAsync(To, Message, LanguageCode);
|
||||
var success = !result.messages.IsNullOrEmpty() && result.messages.FirstOrDefault()?.message_status == "accepted";
|
||||
if (success)
|
||||
{
|
||||
logger.LogInformation("WhatsApp gönderildi. {To}, {LanguageCode}, {Message}", To, LanguageCode, Message);
|
||||
logger.LogInformation("WhatsApp sent successfully. {To}, {LanguageCode}, {Message}", To, LanguageCode, Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning("WhatsApp gönderilemedi. {To}, {LanguageCode}, {Message}", To, LanguageCode, Message);
|
||||
logger.LogWarning("Failed to send WhatsApp message. {To}, {LanguageCode}, {Message}", To, LanguageCode, Message);
|
||||
}
|
||||
|
||||
return new WhatsAppSendResult
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using Sozsoft.Settings.Localization;
|
||||
using Volo.Abp.Authorization.Permissions;
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace Sozsoft.Settings.Permissions;
|
||||
|
||||
|
|
@ -8,12 +6,5 @@ public class SettingsPermissionDefinitionProvider : PermissionDefinitionProvider
|
|||
{
|
||||
public override void Define(IPermissionDefinitionContext context)
|
||||
{
|
||||
var myGroup = context.AddGroup(SettingsPermissions.GroupName, L("Permission:Settings"));
|
||||
}
|
||||
|
||||
private static LocalizableString L(string name)
|
||||
{
|
||||
return LocalizableString.Create<SettingsResource>(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Settings</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Settings.Domain.Shared\Sozsoft.Settings.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@ using System.Threading.Tasks;
|
|||
using Sozsoft.Languages;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
using Volo.Abp.SettingManagement;
|
||||
using Volo.Abp.Settings;
|
||||
using SettingDefinition = Sozsoft.Settings.Entities.SettingDefinition;
|
||||
|
||||
namespace Sozsoft.Settings;
|
||||
|
||||
|
|
@ -20,17 +19,20 @@ public class SettingUiAppService : ApplicationService, ISettingUiAppService
|
|||
private readonly ISettingDefinitionManager settingDefinitionManager;
|
||||
private readonly ISettingManager settingManager;
|
||||
private readonly ErpSettingDefinitionManager ErpSettingDefinitionManager;
|
||||
private readonly ICurrentTenant currentTenant;
|
||||
|
||||
public SettingUiAppService(
|
||||
ILanguageKeyIntegrationService languageKeyIntegrationService,
|
||||
ISettingDefinitionManager settingDefinitionManager,
|
||||
ISettingManager settingManager,
|
||||
ErpSettingDefinitionManager ErpSettingDefinitionManager)
|
||||
ErpSettingDefinitionManager ErpSettingDefinitionManager,
|
||||
ICurrentTenant currentTenant)
|
||||
{
|
||||
this.languageKeyIntegrationService = languageKeyIntegrationService;
|
||||
this.settingDefinitionManager = settingDefinitionManager;
|
||||
this.settingManager = settingManager;
|
||||
this.ErpSettingDefinitionManager = ErpSettingDefinitionManager;
|
||||
this.currentTenant = currentTenant;
|
||||
}
|
||||
|
||||
public virtual async Task<List<MainGroupedSettingDto>> GetListAsync()
|
||||
|
|
@ -95,15 +97,18 @@ public class SettingUiAppService : ApplicationService, ISettingUiAppService
|
|||
{
|
||||
if (setting.Providers.IsNullOrEmpty())
|
||||
{
|
||||
await settingManager.SetForCurrentUserAsync(setting.Name, value);
|
||||
if (currentTenant.Id.HasValue)
|
||||
{
|
||||
await settingManager.SetForCurrentTenantAsync(setting.Name, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
await settingManager.SetGlobalAsync(setting.Name, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (setting.Providers.Any(p => p == UserSettingValueProvider.ProviderName))
|
||||
{
|
||||
await settingManager.SetForCurrentUserAsync(setting.Name, value);
|
||||
}
|
||||
else if (setting.Providers.Any(p => p == TenantSettingValueProvider.ProviderName))
|
||||
if (setting.Providers.Any(p => p == TenantSettingValueProvider.ProviderName) && currentTenant.Id.HasValue)
|
||||
{
|
||||
await settingManager.SetForCurrentTenantAsync(setting.Name, value);
|
||||
}
|
||||
|
|
@ -111,6 +116,10 @@ public class SettingUiAppService : ApplicationService, ISettingUiAppService
|
|||
{
|
||||
await settingManager.SetGlobalAsync(setting.Name, value);
|
||||
}
|
||||
else if (setting.Providers.Any(p => p == UserSettingValueProvider.ProviderName))
|
||||
{
|
||||
await settingManager.SetForCurrentUserAsync(setting.Name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Application;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Mapperly;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.SettingManagement;
|
||||
|
||||
|
|
@ -10,18 +10,14 @@ namespace Sozsoft.Settings;
|
|||
typeof(SettingsDomainModule),
|
||||
typeof(SettingsApplicationContractsModule),
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpAutoMapperModule),
|
||||
typeof(AbpMapperlyModule),
|
||||
typeof(AbpSettingManagementApplicationModule)
|
||||
)]
|
||||
public class SettingsApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddAutoMapperObjectMapper<SettingsApplicationModule>();
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<SettingsApplicationModule>(validate: true);
|
||||
});
|
||||
context.Services.AddMapperlyObjectMapper<SettingsApplicationModule>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
using AutoMapper;
|
||||
using Sozsoft.Settings.Entities;
|
||||
|
||||
namespace Sozsoft.Settings;
|
||||
|
||||
public class SettingsAutoMapperProfile : Profile
|
||||
{
|
||||
public SettingsAutoMapperProfile()
|
||||
{
|
||||
CreateMap<SettingDefinition, SettingDefinitionDto>().ReverseMap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using Sozsoft.Settings.Entities;
|
||||
using Riok.Mapperly.Abstractions;
|
||||
using Volo.Abp.Mapperly;
|
||||
|
||||
namespace Sozsoft.Settings;
|
||||
|
||||
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
|
||||
public partial class SettingDefinitionToSettingDefinitionDtoMapper : TwoWayMapperBase<SettingDefinition, SettingDefinitionDto>
|
||||
{
|
||||
public override partial SettingDefinitionDto Map(SettingDefinition source);
|
||||
|
||||
public override partial void Map(SettingDefinition source, SettingDefinitionDto destination);
|
||||
|
||||
public override void BeforeMap(SettingDefinition source)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterMap(SettingDefinition source, SettingDefinitionDto destination)
|
||||
{
|
||||
}
|
||||
|
||||
public override partial SettingDefinition ReverseMap(SettingDefinitionDto destination);
|
||||
|
||||
public override partial void ReverseMap(SettingDefinitionDto destination, SettingDefinition source);
|
||||
|
||||
public override void BeforeReverseMap(SettingDefinitionDto destination)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AfterReverseMap(SettingDefinitionDto destination, SettingDefinition source)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -3,14 +3,14 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Settings</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Mapperly" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="10.0.0" />
|
||||
<ProjectReference Include="..\..\Sozsoft.Languages\Sozsoft.Languages.Application.Contracts\Sozsoft.Languages.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Sozsoft.Settings.Application.Contracts\Sozsoft.Settings.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Sozsoft.Settings.Domain\Sozsoft.Settings.Domain.csproj" />
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Settings</RootNamespace>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<GenerateEmbeddedFilesManifest>false</GenerateEmbeddedFilesManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -28,22 +28,38 @@ public class SettingsDefinitionProvider : SettingDefinitionProvider
|
|||
foreach (var item in settingDefinitions.OrderBy(a => a.Order))
|
||||
{
|
||||
var iDescription = item.DescriptionKey.IsNullOrEmpty() ? null : L(item.DescriptionKey);
|
||||
var providers = item.Providers.IsNullOrEmpty()
|
||||
? []
|
||||
: item.Providers.Split(MultiValueDelimiter, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
var def = new Volo.Abp.Settings.SettingDefinition(
|
||||
item.Code, item.DefaultValue, L(item.NameKey), iDescription,
|
||||
item.IsVisibleToClients, item.IsInherited, item.IsEncrypted)
|
||||
.WithProperty(SettingsConsts.MainGroup, item.MainGroupKey)
|
||||
var def = context.GetOrNull(item.Code);
|
||||
|
||||
if (def == null)
|
||||
{
|
||||
def = new Volo.Abp.Settings.SettingDefinition(
|
||||
item.Code, item.DefaultValue, L(item.NameKey), iDescription,
|
||||
item.IsVisibleToClients, item.IsInherited, item.IsEncrypted);
|
||||
|
||||
context.Add(def);
|
||||
}
|
||||
else
|
||||
{
|
||||
def.DefaultValue = item.DefaultValue;
|
||||
def.DisplayName = L(item.NameKey);
|
||||
def.Description = iDescription;
|
||||
def.IsVisibleToClients = item.IsVisibleToClients;
|
||||
def.IsInherited = item.IsInherited;
|
||||
def.IsEncrypted = item.IsEncrypted;
|
||||
def.Properties.Clear();
|
||||
def.Providers.Clear();
|
||||
}
|
||||
|
||||
def.Providers.AddRange(providers);
|
||||
def.WithProperty(SettingsConsts.MainGroup, item.MainGroupKey)
|
||||
.WithProperty(SettingsConsts.SubGroup, item.SubGroupKey)
|
||||
.WithProperty(SettingsConsts.DataType, item.DataType)
|
||||
.WithProperty(SettingsConsts.RequiredPermission, item.RequiredPermissionName)
|
||||
.WithProperty(SettingsConsts.SelectOptions, item.SelectOptions?.ToDictionary(x => x.Key, x => L(x.Value)));
|
||||
|
||||
if (!item.Providers.IsNullOrEmpty())
|
||||
{
|
||||
def.Providers.AddRange(item.Providers.Split(MultiValueDelimiter));
|
||||
}
|
||||
|
||||
context.Add(def);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.SettingManagement;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Sozsoft.Settings;
|
||||
|
||||
|
|
@ -11,7 +12,10 @@ public class SettingsDomainModule : AbpModule
|
|||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
|
||||
Configure<AbpSettingOptions>(options =>
|
||||
{
|
||||
options.DefinitionProviders.Remove<SettingsDefinitionProvider>();
|
||||
options.DefinitionProviders.Add<SettingsDefinitionProvider>();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Settings</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.Settings</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.Settings.Domain\Sozsoft.Settings.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.5.3">
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.4.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.9.3">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ public class DatabaseTableDto
|
|||
{
|
||||
public string SchemaName { get; set; }
|
||||
public string TableName { get; set; }
|
||||
public string FullName => $"{SchemaName}.{TableName}";
|
||||
public string DataSourceType { get; set; }
|
||||
public string FullName => DataSourceType == "Postgresql"
|
||||
? $"\"{SchemaName}\".\"{TableName}\""
|
||||
: $"[{SchemaName}].[{TableName}]";
|
||||
}
|
||||
|
||||
public class DatabaseColumnDto
|
||||
|
|
|
|||
|
|
@ -22,9 +22,37 @@ public interface ISqlObjectManagerAppService : IApplicationService
|
|||
|
||||
// Database Metadata Operations
|
||||
Task<List<DatabaseColumnDto>> GetTableColumnsAsync(string dataSourceCode, string schemaName, string tableName);
|
||||
Task<string> GetTableCreateScriptAsync(string dataSourceCode, string schemaName, string tableName);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SQL definition/body of a native SQL Server object (Stored Procedure, View, or Function)
|
||||
/// </summary>
|
||||
Task<string> GetNativeObjectDefinitionAsync(string dataSourceCode, string schemaName, string objectName);
|
||||
|
||||
/// <summary>
|
||||
/// Saves the T-SQL script to Seeds/SqlData/{fileName}.sql in the DbMigrator project.
|
||||
/// Called automatically after a successful SqlTableDesigner deploy so the script can be re-seeded.
|
||||
/// </summary>
|
||||
Task SaveTableScriptAsync(SaveTableScriptDto input);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes matching SQL seed files from Seeds/SqlData when objects are dropped from the UI.
|
||||
/// Non-existing files are ignored.
|
||||
/// </summary>
|
||||
Task DeleteSqlDataFilesAsync(DeleteSqlDataFilesDto input);
|
||||
|
||||
/// <summary>
|
||||
/// Lists .sql files currently available under DbMigrator Seeds/SqlData.
|
||||
/// </summary>
|
||||
Task<List<SqlDataFileDto>> GetSqlDataFilesAsync(string dataDirectoryName = "SqlData", string relativePath = "");
|
||||
|
||||
/// <summary>
|
||||
/// Reads a .sql seed file content from the selected data directory.
|
||||
/// </summary>
|
||||
Task<string> GetSqlDataFileContentAsync(string dataDirectoryName = "SqlData", string relativePath = "");
|
||||
|
||||
/// <summary>
|
||||
/// Moves a SQL seed file between the selected data directory root and HostData.
|
||||
/// </summary>
|
||||
Task MoveSqlDataFileAsync(MoveSqlDataFileDto input);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.SqlQueryManager</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Authorization" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.SqlQueryManager.Domain.Shared\Sozsoft.SqlQueryManager.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Sozsoft.SqlQueryManager.Application.Contracts;
|
||||
|
||||
public class SqlDataFileDto
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string RelativePath { get; set; } = string.Empty;
|
||||
public bool IsDirectory { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
|
|
@ -18,3 +18,38 @@ public class SqlQueryExecutionResultDto
|
|||
public long ExecutionTimeMs { get; set; }
|
||||
public Dictionary<string, object> Metadata { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Input for saving a T-SQL script file to DbMigrator Seeds/SqlData.
|
||||
/// </summary>
|
||||
public class SaveTableScriptDto
|
||||
{
|
||||
/// <summary>
|
||||
/// File name without extension (e.g. "Adm_T_Behavior"). Must not contain path separators.
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The T-SQL script content (CREATE TABLE / ALTER TABLE etc.).
|
||||
/// </summary>
|
||||
public string SqlScript { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Input for deleting seed files from DbMigrator Seeds/SqlData.
|
||||
/// </summary>
|
||||
public class DeleteSqlDataFilesDto
|
||||
{
|
||||
/// <summary>
|
||||
/// File names without extension (e.g. "Adm_T_Behavior").
|
||||
/// Any invalid or unsafe values are ignored.
|
||||
/// </summary>
|
||||
public List<string> FileNames { get; set; } = new();
|
||||
}
|
||||
|
||||
public class MoveSqlDataFileDto
|
||||
{
|
||||
public string DataDirectoryName { get; set; } = string.Empty;
|
||||
public string SourceRelativePath { get; set; } = string.Empty;
|
||||
public string TargetRelativePath { get; set; } = string.Empty;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ public class SqlNativeObjectDto
|
|||
{
|
||||
public string SchemaName { get; set; } = "dbo";
|
||||
public string ObjectName { get; set; } = "";
|
||||
public string FullName => $"[{SchemaName}].[{ObjectName}]";
|
||||
public string DataSourceType { get; set; } = "";
|
||||
public string FullName => DataSourceType == "Postgresql"
|
||||
? $"\"{SchemaName}\".\"{ObjectName}\""
|
||||
: $"[{SchemaName}].[{ObjectName}]";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.SqlQueryManager</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Mapperly" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.SqlQueryManager.Application.Contracts\Sozsoft.SqlQueryManager.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Sozsoft.SqlQueryManager.Domain\Sozsoft.SqlQueryManager.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Application;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Mapperly;
|
||||
using Volo.Abp.Modularity;
|
||||
|
||||
namespace Sozsoft.SqlQueryManager;
|
||||
|
|
@ -9,17 +9,12 @@ namespace Sozsoft.SqlQueryManager;
|
|||
typeof(SqlQueryManagerDomainModule),
|
||||
typeof(SqlQueryManagerApplicationContractsModule),
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpAutoMapperModule)
|
||||
typeof(AbpMapperlyModule)
|
||||
)]
|
||||
public class SqlQueryManagerApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddAutoMapperObjectMapper<SqlQueryManagerApplicationModule>();
|
||||
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<SqlQueryManagerApplicationModule>(validate: true);
|
||||
});
|
||||
context.Services.AddMapperlyObjectMapper<SqlQueryManagerApplicationModule>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
using AutoMapper;
|
||||
|
||||
namespace Sozsoft.SqlQueryManager.Application;
|
||||
|
||||
// No entity-to-DTO mappings needed; SQL objects are no longer persisted in this module.
|
||||
public class SqlQueryManagerAutoMapperProfile : Profile
|
||||
{
|
||||
public SqlQueryManagerAutoMapperProfile()
|
||||
{
|
||||
// intentionally empty
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
namespace Sozsoft.SqlQueryManager.Application;
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<GenerateEmbeddedFilesManifest>false</GenerateEmbeddedFilesManifest>
|
||||
<RootNamespace>Sozsoft.SqlQueryManager</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="10.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Validation" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Linq;
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Sozsoft.Platform.DynamicData;
|
||||
using Sozsoft.Platform.Enums;
|
||||
using Sozsoft.Platform.Queries;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp;
|
||||
|
|
@ -38,14 +39,25 @@ public class SqlExecutorService : DomainService, ISqlExecutorService
|
|||
.WithData("DataSourceCode", dataSourceCode);
|
||||
}
|
||||
|
||||
// Get appropriate repository based on database type
|
||||
// For now, using MS SQL Server repository
|
||||
var repository = _serviceProvider.GetKeyedService<IDynamicDataRepository>("Ms");
|
||||
var repositoryKey = dataSource.DataSourceType switch
|
||||
{
|
||||
DataSourceTypeEnum.Mssql => "Ms",
|
||||
DataSourceTypeEnum.Postgresql => "Pg",
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (repositoryKey == null)
|
||||
{
|
||||
throw new BusinessException("SqlQueryManager:DataSourceTypeNotSupported")
|
||||
.WithData("DatabaseType", dataSource.DataSourceType);
|
||||
}
|
||||
|
||||
var repository = _serviceProvider.GetKeyedService<IDynamicDataRepository>(repositoryKey);
|
||||
|
||||
if (repository == null)
|
||||
{
|
||||
throw new BusinessException("SqlQueryManager:RepositoryNotFound")
|
||||
.WithData("DatabaseType", "Ms");
|
||||
.WithData("DatabaseType", repositoryKey);
|
||||
}
|
||||
|
||||
return repository;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.SqlQueryManager</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.SqlQueryManager.Domain.Shared\Sozsoft.SqlQueryManager.Domain.Shared.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Sozsoft.Platform.Domain\Sozsoft.Platform.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Sozsoft.SqlQueryManager</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="9.0.2" />
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="10.0.0" />
|
||||
<ProjectReference Include="..\Sozsoft.SqlQueryManager.Domain\Sozsoft.SqlQueryManager.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.5.3">
|
||||
<PackageReference Include="ConfigureAwait.Fody" Version="3.4.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Fody" Version="6.9.3">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.16.0" />
|
||||
<PackageReference Include="Scriban" Version="7.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ namespace Sozsoft.Platform.AuditLogs;
|
|||
|
||||
public class AuditLogActionDto : EntityDto<Guid>
|
||||
{
|
||||
public virtual Guid AuditLogId { get; protected set; }
|
||||
public virtual string ServiceName { get; protected set; }
|
||||
public virtual string MethodName { get; protected set; }
|
||||
public virtual string Parameters { get; protected set; }
|
||||
public virtual DateTime ExecutionTime { get; protected set; }
|
||||
public virtual int ExecutionDuration { get; protected set; }
|
||||
public virtual Guid AuditLogId { get; set; }
|
||||
public virtual string ServiceName { get; set; }
|
||||
public virtual string MethodName { get; set; }
|
||||
public virtual string Parameters { get; set; }
|
||||
public virtual DateTime ExecutionTime { get; set; }
|
||||
public virtual int ExecutionDuration { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,24 +13,24 @@ public class AuditLogDto : EntityDto<Guid>
|
|||
}
|
||||
|
||||
public string ApplicationName { get; set; }
|
||||
public Guid? UserId { get; protected set; }
|
||||
public string UserName { get; protected set; }
|
||||
public Guid? TenantId { get; protected set; }
|
||||
public string TenantName { get; protected set; }
|
||||
public DateTime ExecutionTime { get; protected set; }
|
||||
public int ExecutionDuration { get; protected set; }
|
||||
public string ClientIpAddress { get; protected set; }
|
||||
public string ClientName { get; protected set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public Guid? TenantId { get; set; }
|
||||
public string TenantName { get; set; }
|
||||
public DateTime ExecutionTime { get; set; }
|
||||
public int ExecutionDuration { get; set; }
|
||||
public string ClientIpAddress { get; set; }
|
||||
public string ClientName { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public string CorrelationId { get; set; }
|
||||
public string BrowserInfo { get; protected set; }
|
||||
public string HttpMethod { get; protected set; }
|
||||
public string Url { get; protected set; }
|
||||
public string Exceptions { get; protected set; }
|
||||
public string Comments { get; protected set; }
|
||||
public string BrowserInfo { get; set; }
|
||||
public string HttpMethod { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string Exceptions { get; set; }
|
||||
public string Comments { get; set; }
|
||||
public int? HttpStatusCode { get; set; }
|
||||
public ICollection<EntityChangeDto> EntityChanges { get; protected set; }
|
||||
public ICollection<AuditLogActionDto> Actions { get; protected set; }
|
||||
public ICollection<EntityChangeDto> EntityChanges { get; set; }
|
||||
public ICollection<AuditLogActionDto> Actions { get; set; }
|
||||
|
||||
public int? EntityChangeCount { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Sozsoft.Platform.AuditLogs;
|
||||
|
||||
public class AuditLogListRequestDto : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string ListFormCode { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
}
|
||||
|
|
@ -12,12 +12,12 @@ public class EntityChangeDto : EntityDto<Guid>
|
|||
PropertyChanges = new List<EntityPropertyChangeDto>();
|
||||
}
|
||||
|
||||
public virtual Guid AuditLogId { get; protected set; }
|
||||
public virtual DateTime ChangeTime { get; protected set; }
|
||||
public virtual EntityChangeType ChangeType { get; protected set; }
|
||||
public virtual Guid? EntityTenantId { get; protected set; }
|
||||
public virtual string EntityId { get; protected set; }
|
||||
public virtual string EntityTypeFullName { get; protected set; }
|
||||
public virtual ICollection<EntityPropertyChangeDto> PropertyChanges { get; protected set; }
|
||||
public virtual Guid AuditLogId { get; set; }
|
||||
public virtual DateTime ChangeTime { get; set; }
|
||||
public virtual EntityChangeType ChangeType { get; set; }
|
||||
public virtual Guid? EntityTenantId { get; set; }
|
||||
public virtual string EntityId { get; set; }
|
||||
public virtual string EntityTypeFullName { get; set; }
|
||||
public virtual ICollection<EntityPropertyChangeDto> PropertyChanges { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace Sozsoft.Platform.AuditLogs;
|
|||
|
||||
public class EntityPropertyChangeDto : EntityDto<Guid>
|
||||
{
|
||||
public virtual Guid EntityChangeId { get; protected set; }
|
||||
public virtual string NewValue { get; protected set; }
|
||||
public virtual string OriginalValue { get; protected set; }
|
||||
public virtual string PropertyName { get; protected set; }
|
||||
public virtual string PropertyTypeFullName { get; protected set; }
|
||||
public virtual Guid EntityChangeId { get; set; }
|
||||
public virtual string NewValue { get; set; }
|
||||
public virtual string OriginalValue { get; set; }
|
||||
public virtual string PropertyName { get; set; }
|
||||
public virtual string PropertyTypeFullName { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Sozsoft.Platform.Hr;
|
||||
|
||||
public class DepartmentDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid? ParentId { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Sozsoft.Platform.Hr;
|
||||
|
||||
public class JobPositionDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid DepartmentId { get; set; }
|
||||
|
||||
public Guid? ParentId { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace Sozsoft.Platform.Identity.Dto;
|
||||
|
||||
public class AssignedDepartmentViewModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool IsAssigned { get; set; }
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue