李俊城 2 years ago
parent
commit
bc8a40923a
  1. 3
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/EntityDtoBase.cs
  2. 24
      be/Gateways/InternalGateway/InternalGateway.Host/InternalGateway.Host.csproj
  3. 99
      be/Gateways/InternalGateway/InternalGateway.Host/InternalGatewayHostModule.cs
  4. 12
      be/Gateways/InternalGateway/InternalGateway.Host/Program.cs
  5. 12
      be/Gateways/InternalGateway/InternalGateway.Host/Properties/launchSettings.json
  6. 9
      be/Gateways/InternalGateway/InternalGateway.Host/appsettings.Development.json
  7. 18
      be/Gateways/InternalGateway/InternalGateway.Host/appsettings.json
  8. 41
      be/Gateways/InternalGateway/InternalGateway.Host/ocelotsettings.json
  9. 25
      be/Gateways/InternalGateway/InternalGateway.sln
  10. 12
      be/Gateways/WebAppGateway/WebAppGateway.Host/Dockerfile
  11. 12
      be/Gateways/WebAppGateway/WebAppGateway.Host/Program.cs
  12. 12
      be/Gateways/WebAppGateway/WebAppGateway.Host/Properties/launchSettings.json
  13. 35
      be/Gateways/WebAppGateway/WebAppGateway.Host/WebAppGateway.Host.csproj
  14. 112
      be/Gateways/WebAppGateway/WebAppGateway.Host/WebAppGatewayHostModule.cs
  15. 3
      be/Gateways/WebAppGateway/WebAppGateway.Host/appsettings.Development.json
  16. 4
      be/Gateways/WebAppGateway/WebAppGateway.Host/appsettings.Production.json
  17. 4
      be/Gateways/WebAppGateway/WebAppGateway.Host/appsettings.json
  18. 137
      be/Gateways/WebAppGateway/WebAppGateway.Host/ocelotsettings.json
  19. 25
      be/Gateways/WebAppGateway/WebAppGateway.sln
  20. 14
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/TokenService.cs
  21. 50
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/UserMenus/UserMenuAppService.cs
  22. 21
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Users/SfsUserAppService.cs
  23. 2
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.EntityFrameworkCore/Menus/MenuDbContextModelCreatingExtensions.cs
  24. 4
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/AuthWebModule.cs
  25. 4
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile1.pubxml
  26. 9
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Win_in.Sfs.Auth.Web.csproj
  27. 24
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/appsettings.json
  28. 275
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.AuthDbContext.sql
  29. 28
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/scripts/db.Microsoft.EntityFrameworkCore.Sqlite.AuthDbContext.sql
  30. 839
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.AuthDbContext.sql
  31. 4
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Win_in.Sfs.Basedata.HttpApi.Host.csproj
  32. 258
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.BasedataDbContext.sql
  33. 1073
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.BasedataDbContext.sql
  34. 24
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.FileStorageDbContext.sql
  35. 42
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.LabelDbContext.sql
  36. 36
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.MessageDbContext.sql
  37. 97
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.FileStorageDbContext.sql
  38. 195
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.LabelDbContext.sql
  39. 145
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.MessageDbContext.sql
  40. 63
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.InventoryDbContext.sql
  41. 1038
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql
  42. 378
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.InventoryDbContext.sql
  43. 5691
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.StoreDbContext.sql
  44. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Customers/Inputs/CustomerImportInput.cs
  45. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/AQLs/AQLAutoMapperProfile.cs
  46. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Areas/AreaAutoMapperProfile.cs
  47. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs
  48. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/CalendarAutoMapperProfile.cs
  49. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Categories/CategoryAutoMapperProfile.cs
  50. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyAutoMapperProfile.cs
  51. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyExchangeAutoMapperProfile.cs
  52. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerAddresses/CustomerAddressAutoMapperProfile.cs
  53. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs
  54. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Customers/CustomerAutoMapperProfile.cs
  55. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs
  56. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Docks/DockAutoMapperProfile.cs
  57. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs
  58. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemCategories/ItemCategoryAutoMapperProfile.cs
  59. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemGuideBooks/ItemGuideBookAutoMapperProfile.cs
  60. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs
  61. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemQualities/ItemQualityAutoMapperProfile.cs
  62. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemSafetyStocks/ItemSafetyStockAutoMapperProfile.cs
  63. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAutoMapperProfile.cs
  64. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAutoMapperProfile.cs
  65. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/LocationGroups/LocationGroupAutoMapperProfile.cs
  66. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Locations/LocationAutoMapperProfile.cs
  67. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Machines/MachineAutoMapperProfile.cs
  68. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs
  69. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs
  70. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Projects/ProjectAutoMapperProfile.cs
  71. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAutoMapperProfile.cs
  72. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAutoMapperProfile.cs
  73. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Shifts/ShiftAutoMapperProfile.cs
  74. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/StdCostPrices/StdCostPriceSheetAutoMapperProfile.cs
  75. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs
  76. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierTimeWindows/SupplierTimeWindowAutoMapperProfile.cs
  77. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Suppliers/SupplierAutoMapperProfile.cs
  78. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Teams/TeamAutoMapperProfile.cs
  79. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/TransactionTypes/TransactionTypeAutoMapperProfile.cs
  80. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Uoms/UomAutoMapperProfile.cs
  81. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Warehouses/WarehouseAutoMapperProfile.cs
  82. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkCenters/WorkCenterAutoMapperProfile.cs
  83. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkGroups/WorkGroupAutoMapperProfile.cs
  84. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkShops/WorkShopAutoMapperProfile.cs
  85. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumCustomerType.cs
  86. 31
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs
  87. 73
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Properties/Resources.Designer.cs
  88. 124
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Properties/Resources.resx
  89. BIN
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Resources/calibril.ttf
  90. 25
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Win_in.Sfs.Shared.Application.csproj
  91. 73
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs
  92. 67
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/IHostBuilderExtensions.cs
  93. 10
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs
  94. 73
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/Properties/Resources.Designer.cs
  95. 124
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/Properties/Resources.resx
  96. BIN
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/Resources/calibril.ttf
  97. BIN
      be/Modules/Shared/src/Win_in.Sfs.Shared.Host/calibril.ttf
  98. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/IssueNotePermissions.cs
  99. 22
      be/WZC2.sln
  100. 2
      build/src/docker/publish/.env

3
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/EntityDtoBase.cs

@ -11,8 +11,7 @@ public class EntityDtoBase : IEntityDto<Guid>, ICanTrace, IHasErrorMessage
[DataMember]
public Guid Id { get; set; }
[DataMember]
public DateTime CreationTime { get; set; }
[DataMember] public DateTime CreationTime { get; set; }
[DataMember]
public Guid? CreatorId { get; set; }

24
be/Gateways/InternalGateway/InternalGateway.Host/InternalGateway.Host.csproj

@ -1,24 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>InternalGateway</RootNamespace>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.12" />
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.3.5" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="5.3.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Modules\Shared\src\Win_in.Sfs.Shared.Application\Win_in.Sfs.Shared.Application.csproj" />
<ProjectReference Include="..\..\..\Modules\Shared\src\Win_in.Sfs.Shared.Host\Win_in.Sfs.Shared.Host.csproj" />
</ItemGroup>
</Project>

99
be/Gateways/InternalGateway/InternalGateway.Host/InternalGatewayHostModule.cs

@ -1,99 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
using Volo.Abp;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.Security.Claims;
using Win_in.Sfs.Shared.Host;
namespace InternalGateway;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpAspNetCoreSerilogModule)
)]
public class InternalGatewayHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
_ = context.Services.GetHostingEnvironment();
context.SetConsoleTitleOfWebApp("Internal.Gateway");
ConfigureAuthentication(context, configuration);
//ConfigureSql();
//ConfigureRedis(context, configuration, hostingEnvironment);
// ConfigureSwaggerServices(context);
context.Services.AddOcelot(context.Services.GetConfiguration());
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
app.UseCorrelationId();
app.UseRouting();
app.UseAuthentication();
//app.UseMultiTenancy();
//app.UseAuthorization();
app.Use(async (ctx, next) =>
{
var currentPrincipalAccessor = ctx.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>();
var map = new Dictionary<string, string>()
{
{ "sub", AbpClaimTypes.UserId },
{ "role", AbpClaimTypes.Role },
{ "email", AbpClaimTypes.Email },
{ "name", AbpClaimTypes.UserName },
{ "tenantid", AbpClaimTypes.TenantId }
};
var mapClaims = currentPrincipalAccessor.Principal.Claims.Where(p => map.ContainsKey(p.Type)).ToList();
currentPrincipalAccessor.Principal.AddIdentity(new ClaimsIdentity(mapClaims.Select(p => new Claim(map[p.Type], p.Value, p.ValueType, p.Issuer))));
await next().ConfigureAwait(false);
});
// app.UseSwagger();
// app.UseSwaggerUI(options =>
// {
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Business Service API");
// });
//
// app.MapWhen(
// ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/") ||
// ctx.Request.Path.ToString().StartsWith("/Abp/"),
// app2 =>
// {
// app2.UseRouting();
// app2.UseConfiguredEndpoints();
// }
// );
app.UseOcelot().Wait();
app.UseAbpSerilogEnrichers();
}
private static void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication("Bearer")
.AddIdentityServerAuthentication(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.ApiName = "InternalGateway";
});
}
}

12
be/Gateways/InternalGateway/InternalGateway.Host/Program.cs

@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Builder;
using Win_in.Sfs.Shared.Host;
namespace InternalGateway;
public class Program
{
public static int Main(string[] args)
{
return WebApplication.CreateBuilder(args).BuildAndRun<InternalGatewayHostModule>();
}
}

12
be/Gateways/InternalGateway/InternalGateway.Host/Properties/launchSettings.json

@ -1,12 +0,0 @@
{
"profiles": {
"InternalGateway.Host": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:10020"
}
}
}

9
be/Gateways/InternalGateway/InternalGateway.Host/appsettings.Development.json

@ -1,9 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

18
be/Gateways/InternalGateway/InternalGateway.Host/appsettings.json

@ -1,18 +0,0 @@
{
"App": {
"CorsOrigins": [
"http://localhost:10000/"
]
},
"ConnectionStrings": {
"Default": "Server=localhost;Database=ABP;Trusted_Connection=True;"
},
"Redis": {
"Configuration": "dev.ccwin-in.com:16379"
},
"AuthServer": {
"Authority": "http://localhost:9096",
"ApiName": "InternalGateway"
},
"AllowedHosts": "*"
}

41
be/Gateways/InternalGateway/InternalGateway.Host/ocelotsettings.json

@ -1,41 +0,0 @@
{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.cd-top.com",
"Port": 9096
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/basedata/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.cd-top.com",
"Port": 9097
}
],
"UpstreamPathTemplate": "/api/basedata/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/wms/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.cd-top.com",
"Port": 9097
}
],
"UpstreamPathTemplate": "/api/wms/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
}
]
}

25
be/Gateways/InternalGateway/InternalGateway.sln

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InternalGateway.Host", "InternalGateway.Host\InternalGateway.Host.csproj", "{C48F9300-FF79-4E66-9783-7E622FD0945A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C48F9300-FF79-4E66-9783-7E622FD0945A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C48F9300-FF79-4E66-9783-7E622FD0945A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C48F9300-FF79-4E66-9783-7E622FD0945A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C48F9300-FF79-4E66-9783-7E622FD0945A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {343C6B22-83EC-4A39-A731-1DD795BE7EF8}
EndGlobalSection
EndGlobal

12
be/Gateways/WebAppGateway/WebAppGateway.Host/Dockerfile

@ -1,12 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /app
WORKDIR /src
COPY . .
RUN dotnet restore
RUN dotnet publish -c Release -o publish
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build /src/publish ./
ENTRYPOINT ["dotnet", "WebAppGateway.Host.dll"]

12
be/Gateways/WebAppGateway/WebAppGateway.Host/Program.cs

@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Builder;
using Win_in.Sfs.Shared.Host;
namespace WebAppGateway;
public class Program
{
public static int Main(string[] args)
{
return WebApplication.CreateBuilder(args).BuildAndRun<WebAppGatewayHostModule>();
}
}

12
be/Gateways/WebAppGateway/WebAppGateway.Host/Properties/launchSettings.json

@ -1,12 +0,0 @@
{
"profiles": {
"WebAppGateway.Host": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:59099"
}
}
}

35
be/Gateways/WebAppGateway/WebAppGateway.Host/WebAppGateway.Host.csproj

@ -1,35 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>WebAppGateway</RootNamespace>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.12" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.12" />
<PackageReference Include="Ocelot" Version="17.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="5.3.5" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.3.5" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="5.3.5" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="5.3.5" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="5.3.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="5.3.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="5.3.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="5.3.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="5.3.5" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="5.3.5" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="5.3.5" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="5.3.5" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="5.3.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Modules\Shared\src\Win_in.Sfs.Shared.Application\Win_in.Sfs.Shared.Application.csproj" />
<ProjectReference Include="..\..\..\Modules\Shared\src\Win_in.Sfs.Shared.Host\Win_in.Sfs.Shared.Host.csproj" />
</ItemGroup>
</Project>

112
be/Gateways/WebAppGateway/WebAppGateway.Host/WebAppGatewayHostModule.cs

@ -1,112 +0,0 @@
using System;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
using Volo.Abp;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Win_in.Sfs.Shared.Host;
namespace WebAppGateway;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpAspNetCoreSerilogModule)
)]
public class WebAppGatewayHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
_ = context.Services.GetHostingEnvironment();
context.SetConsoleTitleOfWebApp("Web.Gateway");
ConfigureAuthentication(context, configuration);
ConfigureCors(context, configuration);
//ConfigureSwaggerServices(context);
ConfigureLocalization();
context.Services.AddOcelot(context.Services.GetConfiguration());
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
app.UseCorrelationId();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseAbpClaimsMap();
app.UseAuthorization();
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Business Service API");
//});
app.UseOcelot().Wait();
app.UseAbpSerilogEnrichers();
}
private static void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication("Bearer")
.AddIdentityServerAuthentication(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.ApiName = "WebAppGateway";
});
}
/*
private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
{
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "WebAppGateway Service API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
});
}
*/
private void ConfigureLocalization()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
});
}
private static void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
{
var origins = configuration.GetSection("App:CorsOrigins").Get<string[]>();
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
origins.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
}
}

3
be/Gateways/WebAppGateway/WebAppGateway.Host/appsettings.Development.json

@ -1,3 +0,0 @@
{
"Urls": "http://localhost:59099"
}

4
be/Gateways/WebAppGateway/WebAppGateway.Host/appsettings.Production.json

@ -1,4 +0,0 @@
//{} -----
{
"Urls": "http://{应用地址}:59099"
}

4
be/Gateways/WebAppGateway/WebAppGateway.Host/appsettings.json

@ -1,4 +0,0 @@
{
}

137
be/Gateways/WebAppGateway/WebAppGateway.Host/ocelotsettings.json

@ -1,137 +0,0 @@
//dev.ccwin-in.com -----
{
"Routes": [
{
"DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59093
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59093
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/base/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59093
}
],
"UpstreamPathTemplate": "/api/base/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/multi-tenancy/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59093
}
],
"UpstreamPathTemplate": "/api/multi-tenancy/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/permission-management/permissions",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59093
}
],
"UpstreamPathTemplate": "/api/permission-management/permissions",
"UpstreamHttpMethod": [ "Put", "Get" ]
},
{
"DownstreamPathTemplate": "/api/basedata/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59094
}
],
"UpstreamPathTemplate": "/api/basedata/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/wms/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59095
}
],
"UpstreamPathTemplate": "/api/wms/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/label/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59092
}
],
"UpstreamPathTemplate": "/api/label/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/filestore/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59092
}
],
"UpstreamPathTemplate": "/api/filestore/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/reporting/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59092
}
],
"UpstreamPathTemplate": "/api/reporting/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/api/message/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "dev.ccwin-in.com",
"Port": 59092
}
],
"UpstreamPathTemplate": "/api/message/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
}
]
}

25
be/Gateways/WebAppGateway/WebAppGateway.sln

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAppGateway.Host", "WebAppGateway.Host\WebAppGateway.Host.csproj", "{C27EC872-685A-43E2-8E8E-1C4B05B0B004}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C27EC872-685A-43E2-8E8E-1C4B05B0B004}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C27EC872-685A-43E2-8E8E-1C4B05B0B004}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C27EC872-685A-43E2-8E8E-1C4B05B0B004}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C27EC872-685A-43E2-8E8E-1C4B05B0B004}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {993A20BD-5184-407D-8874-270FC037FC57}
EndGlobalSection
EndGlobal

14
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/TokenService.cs

@ -53,6 +53,20 @@ public class TokenService : ApplicationService
result.RefreshToken,
result.Scope });
}
[HttpGet("[action]")]
[AllowAnonymous]
public string Test()
{
return "Test";
}
[HttpGet("/token/test")]
[AllowAnonymous]
public string Test1()
{
return "Test";
}
}
[Display]

50
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/UserMenus/UserMenuAppService.cs

@ -2,17 +2,22 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.Office2010.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Identity;
using Volo.Abp.ObjectMapping;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
using Volo.Abp.Users;
using Win_in.Sfs.Auth.Application.Contracts;
using Win_in.Sfs.Auth.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Auth.Application;
[Authorize]
[AllowAnonymous]
[Route($"{AuthConsts.RootPath}user-menu")]
public class UserMenuAppService :
SfsAuthCrudAppServiceBase<UserMenu, UserMenuDto, SfsAuthRequestInputBase, UserMenuCreateInput>,
@ -25,12 +30,12 @@ public class UserMenuAppService :
private readonly IMenuRepository _menuRepository;
private readonly IPermissionAppService _permissionAppService;
private readonly IIdentityUserAppService _identityUserAppService;
private readonly IIdentityUserRepository _identityUserRepository;
public UserMenuAppService(
IUserMenuRepository repository, IMenuRepository menuRepository
, IPermissionAppService permissionAppService
, IIdentityUserAppService identityUserAppService
) : base(repository)
, IIdentityUserRepository identityUserRepository) : base(repository)
{
base.CreatePolicyName = UserMenuPermissions.Create;
base.UpdatePolicyName = UserMenuPermissions.Update;
@ -38,6 +43,7 @@ public class UserMenuAppService :
_menuRepository = menuRepository;
_permissionAppService = permissionAppService;
_identityUserAppService = identityUserAppService;
_identityUserRepository = identityUserRepository;
}
/// <summary>
@ -46,6 +52,8 @@ public class UserMenuAppService :
/// <param name="userId"></param>
/// <returns></returns>
[HttpGet("pda-menu/{userId}")]
[AllowAnonymous]
[UnitOfWork]
public virtual async Task<List<MenuDto>> GetPdaMenusOfUserAsync(Guid? userId)
{
var userMenus = await _repository
@ -64,31 +72,41 @@ public class UserMenuAppService :
/// <param name="userId"></param>
/// <returns></returns>
[HttpGet("web-menu/{userId}")]
[AllowAnonymous]
[UnitOfWork]
public virtual async Task<List<MenuDto>> GetWebMenusOfUserAsync(Guid? userId)
{
var permissions = await GetPermissionsAsync(userId.Value).ConfigureAwait(false);
var menus = await _menuRepository
var menusEntity = await _menuRepository
.GetListAsync(p => (permissions.Contains(p.Permission) || p.Permission == "skip")
&& p.Portal == WEB_PORTAL
&& p.Status == MenuStatus.Enable).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<Menu>, List<MenuDto>>(menus);
// var userMenus = await _repository
// .GetListAsync(p => p.UserId == userId && p.Portal == WEB_PORTAL);
// var menuCodes = userMenus.Select(p => p.MenuCode).Distinct().ToList();
// var menus = await GetListByPortalAndCodesAsync(WEB_PORTAL, menuCodes);
var menus = ObjectMapper.Map<List<Menu>, List<MenuDto>>(menusEntity);
//var userMenus = await _repository
// .GetListAsync(p => p.UserId == userId);
//userMenus = userMenus.Where(p => (int)p.Portal == (int)EnumPortal.Web).ToList();
var result = BuildMenuTree(dtos);
//var menuCodes = userMenus.Select(p => p.MenuCode).Distinct().ToList();
//var menus = await GetListByPortalAndCodesAsync(WEB_PORTAL, menuCodes);
var result = BuildMenuTree(menus);
return result;
}
[AllowAnonymous]
[UnitOfWork]
[NonAction]
private async Task<List<string>> GetPermissionsAsync(Guid userId)
{
var roles = await _identityUserAppService.GetRolesAsync(userId).ConfigureAwait(false);
//var roles = await _identityUserAppService.GetRolesAsync(userId).ConfigureAwait(false);
var roles = await _identityUserRepository.GetRolesAsync(userId);
var rolesDto=ObjectMapper.Map<List<IdentityRole>, List<IdentityRoleDto>>(roles);
var permissionNames = new List<string>();
foreach (var role in roles.Items)
foreach (var role in rolesDto)
{
var result = await _permissionAppService.GetAsync("R", role.Name).ConfigureAwait(false);
permissionNames.AddRange(from permissionGroup in result.Groups
@ -135,9 +153,9 @@ public class UserMenuAppService :
private async Task<List<MenuDto>> GetListByPortalAndCodesAsync(EnumPortal portal, List<string> menuCodes)
{
var entities = await _menuRepository
.GetListAsync(p => menuCodes.Contains(p.Code)
&& p.Portal == portal
&& p.Status == MenuStatus.Enable).ConfigureAwait(false);
.GetListAsync(p => menuCodes.Contains(p.Code));
entities = entities.Where(p => p.Status == MenuStatus.Enable && p.Portal == EnumPortal.Web).ToList();
return ObjectMapper.Map<List<Menu>, List<MenuDto>>(entities);
}

21
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Users/SfsUserAppService.cs

@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Application.Services;
using Volo.Abp.Identity;
using Win_in.Sfs.Auth.Domain;
@ -15,13 +16,15 @@ namespace Win_in.Sfs.Auth.Users;
public class SfsUserAppService : ApplicationService, ISfsUserAppService
{
private readonly IIdentityUserRepository _userRepository;
private readonly IProfileAppService _profileAppService;
protected readonly IdentityUserManager _userManager;
public SfsUserAppService(
IIdentityUserRepository userRepository,
IdentityUserManager userManager
)
IdentityUserManager userManager,
IProfileAppService profileAppService)
{
_userManager = userManager;
_profileAppService = profileAppService;
_userRepository = userRepository;
}
@ -77,4 +80,18 @@ public class SfsUserAppService : ApplicationService, ISfsUserAppService
return userresult;
}
/// <summary>
/// 修改密码
/// </summary>
/// <param name="userId"></param>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("change-password/{userId}")]
public virtual async Task ChangePasswordAsync(Guid userId,ChangePasswordInput input)
{
var user=await _userManager.GetByIdAsync(userId);
var ttt = user.PasswordHash;
var t=await _userManager.ResetPasswordAsync(user, input.CurrentPassword, input.NewPassword);
}
}

2
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.EntityFrameworkCore/Menus/MenuDbContextModelCreatingExtensions.cs

@ -27,7 +27,7 @@ public static class MenuDbContextModelCreatingExtensions
b.Property(q => q.Portal).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.ParentCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Permission).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Component).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Component).HasMaxLength(SfsPropertyConst.DescLength);
b.Property(q => q.Sort);
b.Property(q => q.GroupSort);
b.Property(q => q.CountUrl);

4
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/AuthWebModule.cs

@ -1,10 +1,13 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.Identity.Web;
@ -61,6 +64,7 @@ public class AuthWebModule : ModuleBase<AuthWebModule>
base.ConfigureBundles();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
CreateDatabase<AuthDbContext>(context);

4
be/Gateways/WebAppGateway/WebAppGateway.Host/Properties/PublishProfiles/FolderProfile.pubxml → be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile1.pubxml

@ -4,13 +4,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>true</DeleteExistingFiles>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\netcoreapp5\publish\</PublishUrl>
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>

9
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Win_in.Sfs.Auth.Web.csproj

@ -14,8 +14,9 @@
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>Win_in.Sfs.Auth-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
<Version>1.2023.324.1018</Version>
<Version>1.2023.327.1207</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageOutputPath />
</PropertyGroup>
<ItemGroup>
@ -56,11 +57,11 @@
</Content>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<!--<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\AuthHost.zip' -Force)" />
</Target>
</Target>-->
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
</Project>

24
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/appsettings.json

@ -5,9 +5,29 @@
"nodes": "http://config:8848",
"env": "prod"
},
"ReverseProxy": {
"Routes": {
"ids4": {
"ClusterId": "ids4cluster",
"Match": {
"Path": "/api/connect/{**catch-all}"
},
"Transforms": [ { "PathRemovePrefix": "/api" } ]
}
},
"Clusters": {
"ids4cluster": {
"Destinations": {
"default": {
"Address": "http://localhost:59093/"
}
}
}
}
},
"ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13319;Database=WmsAuth;uid=ccwin-in;pwd=Microsoft@2022;Packet Size=512;",
"Auth": "Server=dev.ccwin-in.com,13319;Database=WmsAuth;uid=ccwin-in;pwd=Microsoft@2022;Packet Size=512;"
"Default": "Server=dev.ccwin-in.com,21195;Database=WmsAuth;uid=ccwin-in;pwd=Microsoft@2022;Packet Size=512;",
"Auth": "Server=dev.ccwin-in.com,21195;Database=WmsAuth;uid=ccwin-in;pwd=Microsoft@2022;Packet Size=512;"
},
"SwaggerAuthServer": {
"Authority": "http://localhost:59093",

275
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.AuthDbContext.sql

@ -24,8 +24,7 @@ CREATE TABLE [AbpAuditLogs] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpAuditLogs] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpBackgroundJobs] (
@ -41,8 +40,7 @@ CREATE TABLE [AbpBackgroundJobs] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpBackgroundJobs] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpClaimTypes] (
@ -57,8 +55,7 @@ CREATE TABLE [AbpClaimTypes] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpClaimTypes] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpFeatureValues] (
@ -68,8 +65,7 @@ CREATE TABLE [AbpFeatureValues] (
[ProviderName] nvarchar(64) NULL,
[ProviderKey] nvarchar(64) NULL,
CONSTRAINT [PK_AbpFeatureValues] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpLinkUsers] (
@ -79,8 +75,7 @@ CREATE TABLE [AbpLinkUsers] (
[TargetUserId] uniqueidentifier NOT NULL,
[TargetTenantId] uniqueidentifier NULL,
CONSTRAINT [PK_AbpLinkUsers] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpOrganizationUnits] (
@ -100,8 +95,7 @@ CREATE TABLE [AbpOrganizationUnits] (
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_AbpOrganizationUnits] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId] FOREIGN KEY ([ParentId]) REFERENCES [AbpOrganizationUnits] ([Id])
);
GO
)
CREATE TABLE [AbpPermissionGrants] (
@ -111,8 +105,7 @@ CREATE TABLE [AbpPermissionGrants] (
[ProviderName] nvarchar(64) NOT NULL,
[ProviderKey] nvarchar(64) NOT NULL,
CONSTRAINT [PK_AbpPermissionGrants] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpRoles] (
@ -127,8 +120,7 @@ CREATE TABLE [AbpRoles] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpRoles] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpSecurityLogs] (
@ -148,8 +140,7 @@ CREATE TABLE [AbpSecurityLogs] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpSecurityLogs] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpSettings] (
@ -159,8 +150,7 @@ CREATE TABLE [AbpSettings] (
[ProviderName] nvarchar(64) NULL,
[ProviderKey] nvarchar(64) NULL,
CONSTRAINT [PK_AbpSettings] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpTenants] (
@ -176,8 +166,7 @@ CREATE TABLE [AbpTenants] (
[DeleterId] uniqueidentifier NULL,
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_AbpTenants] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpUsers] (
@ -211,8 +200,7 @@ CREATE TABLE [AbpUsers] (
[DeleterId] uniqueidentifier NULL,
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_AbpUsers] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Auth_Department] (
@ -230,8 +218,7 @@ CREATE TABLE [Auth_Department] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Auth_Department] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Auth_Menu] (
@ -246,7 +233,7 @@ CREATE TABLE [Auth_Menu] (
[Portal] nvarchar(64) NOT NULL,
[ParentCode] nvarchar(64) NULL,
[Permission] nvarchar(64) NULL,
[Component] nvarchar(64) NULL,
[Component] nvarchar(1024) NULL,
[GroupName] nvarchar(1024) NULL,
[GroupSort] int NOT NULL,
[CountUrl] nvarchar(max) NULL,
@ -259,8 +246,7 @@ CREATE TABLE [Auth_Menu] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Auth_Menu] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Auth_UserMenu] (
@ -277,8 +263,7 @@ CREATE TABLE [Auth_UserMenu] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Auth_UserMenu] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Auth_UserWorkGroup] (
@ -294,8 +279,7 @@ CREATE TABLE [Auth_UserWorkGroup] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Auth_UserWorkGroup] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [IdentityServerApiResources] (
@ -316,8 +300,7 @@ CREATE TABLE [IdentityServerApiResources] (
[DeleterId] uniqueidentifier NULL,
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_IdentityServerApiResources] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [IdentityServerApiScopes] (
@ -339,8 +322,7 @@ CREATE TABLE [IdentityServerApiScopes] (
[DeleterId] uniqueidentifier NULL,
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_IdentityServerApiScopes] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [IdentityServerClients] (
@ -394,8 +376,7 @@ CREATE TABLE [IdentityServerClients] (
[DeleterId] uniqueidentifier NULL,
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_IdentityServerClients] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [IdentityServerDeviceFlowCodes] (
@ -413,8 +394,7 @@ CREATE TABLE [IdentityServerDeviceFlowCodes] (
[CreationTime] datetime2 NOT NULL,
[CreatorId] uniqueidentifier NULL,
CONSTRAINT [PK_IdentityServerDeviceFlowCodes] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [IdentityServerIdentityResources] (
@ -436,8 +416,7 @@ CREATE TABLE [IdentityServerIdentityResources] (
[DeleterId] uniqueidentifier NULL,
[DeletionTime] datetime2 NULL,
CONSTRAINT [PK_IdentityServerIdentityResources] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [IdentityServerPersistedGrants] (
@ -455,8 +434,7 @@ CREATE TABLE [IdentityServerPersistedGrants] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_IdentityServerPersistedGrants] PRIMARY KEY ([Key])
);
GO
)
CREATE TABLE [AbpAuditLogActions] (
@ -471,8 +449,7 @@ CREATE TABLE [AbpAuditLogActions] (
[ExtraProperties] nvarchar(max) NULL,
CONSTRAINT [PK_AbpAuditLogActions] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId] FOREIGN KEY ([AuditLogId]) REFERENCES [AbpAuditLogs] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpEntityChanges] (
@ -487,8 +464,7 @@ CREATE TABLE [AbpEntityChanges] (
[ExtraProperties] nvarchar(max) NULL,
CONSTRAINT [PK_AbpEntityChanges] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpEntityChanges_AbpAuditLogs_AuditLogId] FOREIGN KEY ([AuditLogId]) REFERENCES [AbpAuditLogs] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpOrganizationUnitRoles] (
@ -500,8 +476,7 @@ CREATE TABLE [AbpOrganizationUnitRoles] (
CONSTRAINT [PK_AbpOrganizationUnitRoles] PRIMARY KEY ([OrganizationUnitId], [RoleId]),
CONSTRAINT [FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId] FOREIGN KEY ([OrganizationUnitId]) REFERENCES [AbpOrganizationUnits] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_AbpOrganizationUnitRoles_AbpRoles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [AbpRoles] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpRoleClaims] (
@ -512,8 +487,7 @@ CREATE TABLE [AbpRoleClaims] (
[ClaimValue] nvarchar(1024) NULL,
CONSTRAINT [PK_AbpRoleClaims] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpRoleClaims_AbpRoles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [AbpRoles] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpTenantConnectionStrings] (
@ -522,8 +496,7 @@ CREATE TABLE [AbpTenantConnectionStrings] (
[Value] nvarchar(1024) NOT NULL,
CONSTRAINT [PK_AbpTenantConnectionStrings] PRIMARY KEY ([TenantId], [Name]),
CONSTRAINT [FK_AbpTenantConnectionStrings_AbpTenants_TenantId] FOREIGN KEY ([TenantId]) REFERENCES [AbpTenants] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpUserClaims] (
@ -534,8 +507,7 @@ CREATE TABLE [AbpUserClaims] (
[ClaimValue] nvarchar(1024) NULL,
CONSTRAINT [PK_AbpUserClaims] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpUserClaims_AbpUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [AbpUsers] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpUserLogins] (
@ -546,8 +518,7 @@ CREATE TABLE [AbpUserLogins] (
[ProviderDisplayName] nvarchar(128) NULL,
CONSTRAINT [PK_AbpUserLogins] PRIMARY KEY ([UserId], [LoginProvider]),
CONSTRAINT [FK_AbpUserLogins_AbpUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [AbpUsers] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpUserOrganizationUnits] (
@ -559,8 +530,7 @@ CREATE TABLE [AbpUserOrganizationUnits] (
CONSTRAINT [PK_AbpUserOrganizationUnits] PRIMARY KEY ([OrganizationUnitId], [UserId]),
CONSTRAINT [FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId] FOREIGN KEY ([OrganizationUnitId]) REFERENCES [AbpOrganizationUnits] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_AbpUserOrganizationUnits_AbpUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [AbpUsers] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpUserRoles] (
@ -570,8 +540,7 @@ CREATE TABLE [AbpUserRoles] (
CONSTRAINT [PK_AbpUserRoles] PRIMARY KEY ([UserId], [RoleId]),
CONSTRAINT [FK_AbpUserRoles_AbpRoles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [AbpRoles] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_AbpUserRoles_AbpUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [AbpUsers] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpUserTokens] (
@ -582,8 +551,7 @@ CREATE TABLE [AbpUserTokens] (
[Value] nvarchar(max) NULL,
CONSTRAINT [PK_AbpUserTokens] PRIMARY KEY ([UserId], [LoginProvider], [Name]),
CONSTRAINT [FK_AbpUserTokens_AbpUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [AbpUsers] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerApiResourceClaims] (
@ -591,8 +559,7 @@ CREATE TABLE [IdentityServerApiResourceClaims] (
[ApiResourceId] uniqueidentifier NOT NULL,
CONSTRAINT [PK_IdentityServerApiResourceClaims] PRIMARY KEY ([ApiResourceId], [Type]),
CONSTRAINT [FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId] FOREIGN KEY ([ApiResourceId]) REFERENCES [IdentityServerApiResources] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerApiResourceProperties] (
@ -601,8 +568,7 @@ CREATE TABLE [IdentityServerApiResourceProperties] (
[Value] nvarchar(2000) NOT NULL,
CONSTRAINT [PK_IdentityServerApiResourceProperties] PRIMARY KEY ([ApiResourceId], [Key], [Value]),
CONSTRAINT [FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId] FOREIGN KEY ([ApiResourceId]) REFERENCES [IdentityServerApiResources] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerApiResourceScopes] (
@ -610,8 +576,7 @@ CREATE TABLE [IdentityServerApiResourceScopes] (
[Scope] nvarchar(200) NOT NULL,
CONSTRAINT [PK_IdentityServerApiResourceScopes] PRIMARY KEY ([ApiResourceId], [Scope]),
CONSTRAINT [FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId] FOREIGN KEY ([ApiResourceId]) REFERENCES [IdentityServerApiResources] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerApiResourceSecrets] (
@ -622,8 +587,7 @@ CREATE TABLE [IdentityServerApiResourceSecrets] (
[Expiration] datetime2 NULL,
CONSTRAINT [PK_IdentityServerApiResourceSecrets] PRIMARY KEY ([ApiResourceId], [Type], [Value]),
CONSTRAINT [FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId] FOREIGN KEY ([ApiResourceId]) REFERENCES [IdentityServerApiResources] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerApiScopeClaims] (
@ -631,8 +595,7 @@ CREATE TABLE [IdentityServerApiScopeClaims] (
[ApiScopeId] uniqueidentifier NOT NULL,
CONSTRAINT [PK_IdentityServerApiScopeClaims] PRIMARY KEY ([ApiScopeId], [Type]),
CONSTRAINT [FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId] FOREIGN KEY ([ApiScopeId]) REFERENCES [IdentityServerApiScopes] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerApiScopeProperties] (
@ -641,8 +604,7 @@ CREATE TABLE [IdentityServerApiScopeProperties] (
[Value] nvarchar(2000) NOT NULL,
CONSTRAINT [PK_IdentityServerApiScopeProperties] PRIMARY KEY ([ApiScopeId], [Key], [Value]),
CONSTRAINT [FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId] FOREIGN KEY ([ApiScopeId]) REFERENCES [IdentityServerApiScopes] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientClaims] (
@ -651,8 +613,7 @@ CREATE TABLE [IdentityServerClientClaims] (
[Value] nvarchar(250) NOT NULL,
CONSTRAINT [PK_IdentityServerClientClaims] PRIMARY KEY ([ClientId], [Type], [Value]),
CONSTRAINT [FK_IdentityServerClientClaims_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientCorsOrigins] (
@ -660,8 +621,7 @@ CREATE TABLE [IdentityServerClientCorsOrigins] (
[Origin] nvarchar(150) NOT NULL,
CONSTRAINT [PK_IdentityServerClientCorsOrigins] PRIMARY KEY ([ClientId], [Origin]),
CONSTRAINT [FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientGrantTypes] (
@ -669,8 +629,7 @@ CREATE TABLE [IdentityServerClientGrantTypes] (
[GrantType] nvarchar(250) NOT NULL,
CONSTRAINT [PK_IdentityServerClientGrantTypes] PRIMARY KEY ([ClientId], [GrantType]),
CONSTRAINT [FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientIdPRestrictions] (
@ -678,8 +637,7 @@ CREATE TABLE [IdentityServerClientIdPRestrictions] (
[Provider] nvarchar(200) NOT NULL,
CONSTRAINT [PK_IdentityServerClientIdPRestrictions] PRIMARY KEY ([ClientId], [Provider]),
CONSTRAINT [FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientPostLogoutRedirectUris] (
@ -687,8 +645,7 @@ CREATE TABLE [IdentityServerClientPostLogoutRedirectUris] (
[PostLogoutRedirectUri] nvarchar(2000) NOT NULL,
CONSTRAINT [PK_IdentityServerClientPostLogoutRedirectUris] PRIMARY KEY ([ClientId], [PostLogoutRedirectUri]),
CONSTRAINT [FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientProperties] (
@ -697,8 +654,7 @@ CREATE TABLE [IdentityServerClientProperties] (
[Value] nvarchar(2000) NOT NULL,
CONSTRAINT [PK_IdentityServerClientProperties] PRIMARY KEY ([ClientId], [Key], [Value]),
CONSTRAINT [FK_IdentityServerClientProperties_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientRedirectUris] (
@ -706,8 +662,7 @@ CREATE TABLE [IdentityServerClientRedirectUris] (
[RedirectUri] nvarchar(2000) NOT NULL,
CONSTRAINT [PK_IdentityServerClientRedirectUris] PRIMARY KEY ([ClientId], [RedirectUri]),
CONSTRAINT [FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientScopes] (
@ -715,8 +670,7 @@ CREATE TABLE [IdentityServerClientScopes] (
[Scope] nvarchar(200) NOT NULL,
CONSTRAINT [PK_IdentityServerClientScopes] PRIMARY KEY ([ClientId], [Scope]),
CONSTRAINT [FK_IdentityServerClientScopes_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerClientSecrets] (
@ -727,8 +681,7 @@ CREATE TABLE [IdentityServerClientSecrets] (
[Expiration] datetime2 NULL,
CONSTRAINT [PK_IdentityServerClientSecrets] PRIMARY KEY ([ClientId], [Type], [Value]),
CONSTRAINT [FK_IdentityServerClientSecrets_IdentityServerClients_ClientId] FOREIGN KEY ([ClientId]) REFERENCES [IdentityServerClients] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerIdentityResourceClaims] (
@ -736,8 +689,7 @@ CREATE TABLE [IdentityServerIdentityResourceClaims] (
[IdentityResourceId] uniqueidentifier NOT NULL,
CONSTRAINT [PK_IdentityServerIdentityResourceClaims] PRIMARY KEY ([IdentityResourceId], [Type]),
CONSTRAINT [FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId] FOREIGN KEY ([IdentityResourceId]) REFERENCES [IdentityServerIdentityResources] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [IdentityServerIdentityResourceProperties] (
@ -746,8 +698,7 @@ CREATE TABLE [IdentityServerIdentityResourceProperties] (
[Value] nvarchar(2000) NOT NULL,
CONSTRAINT [PK_IdentityServerIdentityResourceProperties] PRIMARY KEY ([IdentityResourceId], [Key], [Value]),
CONSTRAINT [FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId] FOREIGN KEY ([IdentityResourceId]) REFERENCES [IdentityServerIdentityResources] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE TABLE [AbpEntityPropertyChanges] (
@ -760,171 +711,129 @@ CREATE TABLE [AbpEntityPropertyChanges] (
[PropertyTypeFullName] nvarchar(64) NOT NULL,
CONSTRAINT [PK_AbpEntityPropertyChanges] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId] FOREIGN KEY ([EntityChangeId]) REFERENCES [AbpEntityChanges] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE INDEX [IX_AbpAuditLogActions_AuditLogId] ON [AbpAuditLogActions] ([AuditLogId]);
GO
CREATE INDEX [IX_AbpAuditLogActions_AuditLogId] ON [AbpAuditLogActions] ([AuditLogId])
CREATE INDEX [IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime] ON [AbpAuditLogActions] ([TenantId], [ServiceName], [MethodName], [ExecutionTime]);
GO
CREATE INDEX [IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime] ON [AbpAuditLogActions] ([TenantId], [ServiceName], [MethodName], [ExecutionTime])
CREATE INDEX [IX_AbpAuditLogs_TenantId_ExecutionTime] ON [AbpAuditLogs] ([TenantId], [ExecutionTime]);
GO
CREATE INDEX [IX_AbpAuditLogs_TenantId_ExecutionTime] ON [AbpAuditLogs] ([TenantId], [ExecutionTime])
CREATE INDEX [IX_AbpAuditLogs_TenantId_UserId_ExecutionTime] ON [AbpAuditLogs] ([TenantId], [UserId], [ExecutionTime]);
GO
CREATE INDEX [IX_AbpAuditLogs_TenantId_UserId_ExecutionTime] ON [AbpAuditLogs] ([TenantId], [UserId], [ExecutionTime])
CREATE INDEX [IX_AbpBackgroundJobs_IsAbandoned_NextTryTime] ON [AbpBackgroundJobs] ([IsAbandoned], [NextTryTime]);
GO
CREATE INDEX [IX_AbpBackgroundJobs_IsAbandoned_NextTryTime] ON [AbpBackgroundJobs] ([IsAbandoned], [NextTryTime])
CREATE INDEX [IX_AbpEntityChanges_AuditLogId] ON [AbpEntityChanges] ([AuditLogId]);
GO
CREATE INDEX [IX_AbpEntityChanges_AuditLogId] ON [AbpEntityChanges] ([AuditLogId])
CREATE INDEX [IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId] ON [AbpEntityChanges] ([TenantId], [EntityTypeFullName], [EntityId]);
GO
CREATE INDEX [IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId] ON [AbpEntityChanges] ([TenantId], [EntityTypeFullName], [EntityId])
CREATE INDEX [IX_AbpEntityPropertyChanges_EntityChangeId] ON [AbpEntityPropertyChanges] ([EntityChangeId]);
GO
CREATE INDEX [IX_AbpEntityPropertyChanges_EntityChangeId] ON [AbpEntityPropertyChanges] ([EntityChangeId])
CREATE UNIQUE INDEX [IX_AbpFeatureValues_Name_ProviderName_ProviderKey] ON [AbpFeatureValues] ([Name], [ProviderName], [ProviderKey]) WHERE [ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_AbpFeatureValues_Name_ProviderName_ProviderKey] ON [AbpFeatureValues] ([Name], [ProviderName], [ProviderKey]) WHERE [ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL
CREATE UNIQUE INDEX [IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId] ON [AbpLinkUsers] ([SourceUserId], [SourceTenantId], [TargetUserId], [TargetTenantId]) WHERE [SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId] ON [AbpLinkUsers] ([SourceUserId], [SourceTenantId], [TargetUserId], [TargetTenantId]) WHERE [SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL
CREATE INDEX [IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId] ON [AbpOrganizationUnitRoles] ([RoleId], [OrganizationUnitId]);
GO
CREATE INDEX [IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId] ON [AbpOrganizationUnitRoles] ([RoleId], [OrganizationUnitId])
CREATE INDEX [IX_AbpOrganizationUnits_Code] ON [AbpOrganizationUnits] ([Code]);
GO
CREATE INDEX [IX_AbpOrganizationUnits_Code] ON [AbpOrganizationUnits] ([Code])
CREATE INDEX [IX_AbpOrganizationUnits_ParentId] ON [AbpOrganizationUnits] ([ParentId]);
GO
CREATE INDEX [IX_AbpOrganizationUnits_ParentId] ON [AbpOrganizationUnits] ([ParentId])
CREATE UNIQUE INDEX [IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey] ON [AbpPermissionGrants] ([TenantId], [Name], [ProviderName], [ProviderKey]) WHERE [TenantId] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey] ON [AbpPermissionGrants] ([TenantId], [Name], [ProviderName], [ProviderKey]) WHERE [TenantId] IS NOT NULL
CREATE INDEX [IX_AbpRoleClaims_RoleId] ON [AbpRoleClaims] ([RoleId]);
GO
CREATE INDEX [IX_AbpRoleClaims_RoleId] ON [AbpRoleClaims] ([RoleId])
CREATE INDEX [IX_AbpRoles_NormalizedName] ON [AbpRoles] ([NormalizedName]);
GO
CREATE INDEX [IX_AbpRoles_NormalizedName] ON [AbpRoles] ([NormalizedName])
CREATE INDEX [IX_AbpSecurityLogs_TenantId_Action] ON [AbpSecurityLogs] ([TenantId], [Action]);
GO
CREATE INDEX [IX_AbpSecurityLogs_TenantId_Action] ON [AbpSecurityLogs] ([TenantId], [Action])
CREATE INDEX [IX_AbpSecurityLogs_TenantId_ApplicationName] ON [AbpSecurityLogs] ([TenantId], [ApplicationName]);
GO
CREATE INDEX [IX_AbpSecurityLogs_TenantId_ApplicationName] ON [AbpSecurityLogs] ([TenantId], [ApplicationName])
CREATE INDEX [IX_AbpSecurityLogs_TenantId_Identity] ON [AbpSecurityLogs] ([TenantId], [Identity]);
GO
CREATE INDEX [IX_AbpSecurityLogs_TenantId_Identity] ON [AbpSecurityLogs] ([TenantId], [Identity])
CREATE INDEX [IX_AbpSecurityLogs_TenantId_UserId] ON [AbpSecurityLogs] ([TenantId], [UserId]);
GO
CREATE INDEX [IX_AbpSecurityLogs_TenantId_UserId] ON [AbpSecurityLogs] ([TenantId], [UserId])
CREATE UNIQUE INDEX [IX_AbpSettings_Name_ProviderName_ProviderKey] ON [AbpSettings] ([Name], [ProviderName], [ProviderKey]) WHERE [ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_AbpSettings_Name_ProviderName_ProviderKey] ON [AbpSettings] ([Name], [ProviderName], [ProviderKey]) WHERE [ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL
CREATE INDEX [IX_AbpTenants_Name] ON [AbpTenants] ([Name]);
GO
CREATE INDEX [IX_AbpTenants_Name] ON [AbpTenants] ([Name])
CREATE INDEX [IX_AbpUserClaims_UserId] ON [AbpUserClaims] ([UserId]);
GO
CREATE INDEX [IX_AbpUserClaims_UserId] ON [AbpUserClaims] ([UserId])
CREATE INDEX [IX_AbpUserLogins_LoginProvider_ProviderKey] ON [AbpUserLogins] ([LoginProvider], [ProviderKey]);
GO
CREATE INDEX [IX_AbpUserLogins_LoginProvider_ProviderKey] ON [AbpUserLogins] ([LoginProvider], [ProviderKey])
CREATE INDEX [IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId] ON [AbpUserOrganizationUnits] ([UserId], [OrganizationUnitId]);
GO
CREATE INDEX [IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId] ON [AbpUserOrganizationUnits] ([UserId], [OrganizationUnitId])
CREATE INDEX [IX_AbpUserRoles_RoleId_UserId] ON [AbpUserRoles] ([RoleId], [UserId]);
GO
CREATE INDEX [IX_AbpUserRoles_RoleId_UserId] ON [AbpUserRoles] ([RoleId], [UserId])
CREATE INDEX [IX_AbpUsers_Email] ON [AbpUsers] ([Email]);
GO
CREATE INDEX [IX_AbpUsers_Email] ON [AbpUsers] ([Email])
CREATE INDEX [IX_AbpUsers_NormalizedEmail] ON [AbpUsers] ([NormalizedEmail]);
GO
CREATE INDEX [IX_AbpUsers_NormalizedEmail] ON [AbpUsers] ([NormalizedEmail])
CREATE INDEX [IX_AbpUsers_NormalizedUserName] ON [AbpUsers] ([NormalizedUserName]);
GO
CREATE INDEX [IX_AbpUsers_NormalizedUserName] ON [AbpUsers] ([NormalizedUserName])
CREATE INDEX [IX_AbpUsers_UserName] ON [AbpUsers] ([UserName]);
GO
CREATE INDEX [IX_AbpUsers_UserName] ON [AbpUsers] ([UserName])
CREATE UNIQUE INDEX [IX_Auth_Department_Code] ON [Auth_Department] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Auth_Department_Code] ON [Auth_Department] ([Code])
CREATE UNIQUE INDEX [IX_Auth_Menu_Code] ON [Auth_Menu] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Auth_Menu_Code] ON [Auth_Menu] ([Code])
CREATE UNIQUE INDEX [IX_Auth_UserMenu_UserId_MenuCode] ON [Auth_UserMenu] ([UserId], [MenuCode]);
GO
CREATE UNIQUE INDEX [IX_Auth_UserMenu_UserId_MenuCode] ON [Auth_UserMenu] ([UserId], [MenuCode])
CREATE UNIQUE INDEX [IX_Auth_UserWorkGroup_WorkGroupCode_UserId] ON [Auth_UserWorkGroup] ([WorkGroupCode], [UserId]);
GO
CREATE UNIQUE INDEX [IX_Auth_UserWorkGroup_WorkGroupCode_UserId] ON [Auth_UserWorkGroup] ([WorkGroupCode], [UserId])
CREATE INDEX [IX_IdentityServerClients_ClientId] ON [IdentityServerClients] ([ClientId]);
GO
CREATE INDEX [IX_IdentityServerClients_ClientId] ON [IdentityServerClients] ([ClientId])
CREATE UNIQUE INDEX [IX_IdentityServerDeviceFlowCodes_DeviceCode] ON [IdentityServerDeviceFlowCodes] ([DeviceCode]);
GO
CREATE UNIQUE INDEX [IX_IdentityServerDeviceFlowCodes_DeviceCode] ON [IdentityServerDeviceFlowCodes] ([DeviceCode])
CREATE INDEX [IX_IdentityServerDeviceFlowCodes_Expiration] ON [IdentityServerDeviceFlowCodes] ([Expiration]);
GO
CREATE INDEX [IX_IdentityServerDeviceFlowCodes_Expiration] ON [IdentityServerDeviceFlowCodes] ([Expiration])
CREATE INDEX [IX_IdentityServerDeviceFlowCodes_UserCode] ON [IdentityServerDeviceFlowCodes] ([UserCode]);
GO
CREATE INDEX [IX_IdentityServerDeviceFlowCodes_UserCode] ON [IdentityServerDeviceFlowCodes] ([UserCode])
CREATE INDEX [IX_IdentityServerPersistedGrants_Expiration] ON [IdentityServerPersistedGrants] ([Expiration]);
GO
CREATE INDEX [IX_IdentityServerPersistedGrants_Expiration] ON [IdentityServerPersistedGrants] ([Expiration])
CREATE INDEX [IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type] ON [IdentityServerPersistedGrants] ([SubjectId], [ClientId], [Type]);
GO
CREATE INDEX [IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type] ON [IdentityServerPersistedGrants] ([SubjectId], [ClientId], [Type])
CREATE INDEX [IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type] ON [IdentityServerPersistedGrants] ([SubjectId], [SessionId], [Type]);
GO
CREATE INDEX [IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type] ON [IdentityServerPersistedGrants] ([SubjectId], [SessionId], [Type])

28
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/scripts/db.Microsoft.EntityFrameworkCore.Sqlite.AuthDbContext.sql

@ -783,30 +783,4 @@ CREATE UNIQUE INDEX "IX_Auth_Department_Code" ON "Auth_Department" ("Code");
CREATE UNIQUE INDEX "IX_Auth_Menu_Code" ON "Auth_Menu" ("Code");
CREATE UNIQUE INDEX "IX_Auth_UserMenu_UserId_MenuCode" ON "Auth_UserMenu" ("UserId", "MenuCode");
CREATE UNIQUE INDEX "IX_Auth_UserWorkGroup_WorkGroupCode_UserId" ON "Auth_UserWorkGroup" ("WorkGroupCode", "UserId");
CREATE INDEX "IX_IdentityServerClients_ClientId" ON "IdentityServerClients" ("ClientId");
CREATE UNIQUE INDEX "IX_IdentityServerDeviceFlowCodes_DeviceCode" ON "IdentityServerDeviceFlowCodes" ("DeviceCode");
CREATE INDEX "IX_IdentityServerDeviceFlowCodes_Expiration" ON "IdentityServerDeviceFlowCodes" ("Expiration");
CREATE INDEX "IX_IdentityServerDeviceFlowCodes_UserCode" ON "IdentityServerDeviceFlowCodes" ("UserCode");
CREATE INDEX "IX_IdentityServerPersistedGrants_Expiration" ON "IdentityServerPersistedGrants" ("Expiration");
CREATE INDEX "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type" ON "IdentityServerPersistedGrants" ("SubjectId", "ClientId", "Type");
CREATE INDEX "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type" ON "IdentityServerPersistedGrants" ("SubjectId", "SessionId", "Type");
CREATE UNIQUE INDEX "IX_Auth_UserMenu_UserId_Men

839
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.AuthDbContext.sql

@ -0,0 +1,839 @@
CREATE TABLE "AbpAuditLogs" (
"Id" uuid NOT NULL,
"ApplicationName" character varying(96) NULL,
"UserId" uuid NULL,
"UserName" character varying(256) NULL,
"TenantId" uuid NULL,
"TenantName" character varying(64) NULL,
"ImpersonatorUserId" uuid NULL,
"ImpersonatorUserName" character varying(256) NULL,
"ImpersonatorTenantId" uuid NULL,
"ImpersonatorTenantName" character varying(64) NULL,
"ExecutionTime" timestamp without time zone NOT NULL,
"ExecutionDuration" integer NOT NULL,
"ClientIpAddress" character varying(64) NULL,
"ClientName" character varying(128) NULL,
"ClientId" character varying(64) NULL,
"CorrelationId" character varying(64) NULL,
"BrowserInfo" character varying(512) NULL,
"HttpMethod" character varying(16) NULL,
"Url" character varying(256) NULL,
"Exceptions" text NULL,
"Comments" character varying(256) NULL,
"HttpStatusCode" integer NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpAuditLogs" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpBackgroundJobs" (
"Id" uuid NOT NULL,
"JobName" character varying(128) NOT NULL,
"JobArgs" character varying(1048576) NOT NULL,
"TryCount" smallint NOT NULL DEFAULT 0,
"CreationTime" timestamp without time zone NOT NULL,
"NextTryTime" timestamp without time zone NOT NULL,
"LastTryTime" timestamp without time zone NULL,
"IsAbandoned" boolean NOT NULL DEFAULT FALSE,
"Priority" smallint NOT NULL DEFAULT 15,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpBackgroundJobs" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpClaimTypes" (
"Id" uuid NOT NULL,
"Name" character varying(256) NOT NULL,
"Required" boolean NOT NULL,
"IsStatic" boolean NOT NULL,
"Regex" character varying(512) NULL,
"RegexDescription" character varying(128) NULL,
"Description" character varying(256) NULL,
"ValueType" integer NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpClaimTypes" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpFeatureValues" (
"Id" uuid NOT NULL,
"Name" character varying(128) NOT NULL,
"Value" character varying(128) NOT NULL,
"ProviderName" character varying(64) NULL,
"ProviderKey" character varying(64) NULL,
CONSTRAINT "PK_AbpFeatureValues" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpLinkUsers" (
"Id" uuid NOT NULL,
"SourceUserId" uuid NOT NULL,
"SourceTenantId" uuid NULL,
"TargetUserId" uuid NOT NULL,
"TargetTenantId" uuid NULL,
CONSTRAINT "PK_AbpLinkUsers" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpOrganizationUnits" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"ParentId" uuid NULL,
"Code" character varying(95) NOT NULL,
"DisplayName" character varying(128) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_AbpOrganizationUnits" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId" FOREIGN KEY ("ParentId") REFERENCES "AbpOrganizationUnits" ("Id")
);
CREATE TABLE "AbpPermissionGrants" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"Name" character varying(128) NOT NULL,
"ProviderName" character varying(64) NOT NULL,
"ProviderKey" character varying(64) NOT NULL,
CONSTRAINT "PK_AbpPermissionGrants" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpRoles" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"Name" character varying(256) NOT NULL,
"NormalizedName" character varying(256) NOT NULL,
"IsDefault" boolean NOT NULL,
"IsStatic" boolean NOT NULL,
"IsPublic" boolean NOT NULL,
"Description" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpRoles" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpSecurityLogs" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"ApplicationName" character varying(96) NULL,
"Identity" character varying(96) NULL,
"Action" character varying(96) NULL,
"UserId" uuid NULL,
"UserName" character varying(256) NULL,
"TenantName" character varying(64) NULL,
"ClientId" character varying(64) NULL,
"CorrelationId" character varying(64) NULL,
"ClientIpAddress" character varying(64) NULL,
"BrowserInfo" character varying(512) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpSecurityLogs" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpSettings" (
"Id" uuid NOT NULL,
"Name" character varying(128) NOT NULL,
"Value" character varying(2048) NOT NULL,
"ProviderName" character varying(64) NULL,
"ProviderKey" character varying(64) NULL,
CONSTRAINT "PK_AbpSettings" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpTenants" (
"Id" uuid NOT NULL,
"Name" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_AbpTenants" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpUsers" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"UserName" character varying(256) NOT NULL,
"NormalizedUserName" character varying(256) NOT NULL,
"Name" character varying(64) NULL,
"Surname" character varying(64) NULL,
"Email" character varying(256) NOT NULL,
"NormalizedEmail" character varying(256) NOT NULL,
"EmailConfirmed" boolean NOT NULL DEFAULT FALSE,
"PasswordHash" character varying(256) NULL,
"SecurityStamp" character varying(256) NOT NULL,
"IsExternal" boolean NOT NULL DEFAULT FALSE,
"PhoneNumber" character varying(16) NULL,
"PhoneNumberConfirmed" boolean NOT NULL DEFAULT FALSE,
"IsActive" boolean NOT NULL,
"TwoFactorEnabled" boolean NOT NULL DEFAULT FALSE,
"LockoutEnd" timestamp with time zone NULL,
"LockoutEnabled" boolean NOT NULL DEFAULT FALSE,
"AccessFailedCount" integer NOT NULL DEFAULT 0,
"DepartmentCode" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_AbpUsers" PRIMARY KEY ("Id")
);
CREATE TABLE "Auth_Department" (
"Id" uuid NOT NULL,
"Code" character varying(64) NOT NULL,
"Name" character varying(64) NULL,
"Description" character varying(1024) NULL,
"IsActive" boolean NOT NULL DEFAULT TRUE,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Auth_Department" PRIMARY KEY ("Id")
);
CREATE TABLE "Auth_Menu" (
"Id" uuid NOT NULL,
"Code" character varying(64) NOT NULL,
"Name" character varying(64) NOT NULL,
"Description" character varying(1024) NULL,
"Icon" character varying(64) NULL,
"Route" character varying(64) NULL,
"Status" character varying(64) NOT NULL DEFAULT 'Enable',
"Sort" integer NOT NULL,
"Portal" character varying(64) NOT NULL,
"ParentCode" character varying(64) NULL,
"Permission" character varying(64) NULL,
"Component" character varying(64) NULL,
"GroupName" character varying(1024) NULL,
"GroupSort" integer NOT NULL,
"CountUrl" text NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Auth_Menu" PRIMARY KEY ("Id")
);
CREATE TABLE "Auth_UserMenu" (
"Id" uuid NOT NULL,
"UserId" uuid NOT NULL,
"MenuCode" character varying(64) NOT NULL,
"Portal" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Auth_UserMenu" PRIMARY KEY ("Id")
);
CREATE TABLE "Auth_UserWorkGroup" (
"Id" uuid NOT NULL,
"UserId" uuid NOT NULL,
"WorkGroupCode" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Auth_UserWorkGroup" PRIMARY KEY ("Id")
);
CREATE TABLE "IdentityServerApiResources" (
"Id" uuid NOT NULL,
"Name" character varying(200) NOT NULL,
"DisplayName" character varying(200) NULL,
"Description" character varying(1000) NULL,
"Enabled" boolean NOT NULL,
"AllowedAccessTokenSigningAlgorithms" character varying(100) NULL,
"ShowInDiscoveryDocument" boolean NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_IdentityServerApiResources" PRIMARY KEY ("Id")
);
CREATE TABLE "IdentityServerApiScopes" (
"Id" uuid NOT NULL,
"Enabled" boolean NOT NULL,
"Name" character varying(200) NOT NULL,
"DisplayName" character varying(200) NULL,
"Description" character varying(1000) NULL,
"Required" boolean NOT NULL,
"Emphasize" boolean NOT NULL,
"ShowInDiscoveryDocument" boolean NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_IdentityServerApiScopes" PRIMARY KEY ("Id")
);
CREATE TABLE "IdentityServerClients" (
"Id" uuid NOT NULL,
"ClientId" character varying(200) NOT NULL,
"ClientName" character varying(200) NULL,
"Description" character varying(1000) NULL,
"ClientUri" character varying(2000) NULL,
"LogoUri" character varying(2000) NULL,
"Enabled" boolean NOT NULL,
"ProtocolType" character varying(200) NOT NULL,
"RequireClientSecret" boolean NOT NULL,
"RequireConsent" boolean NOT NULL,
"AllowRememberConsent" boolean NOT NULL,
"AlwaysIncludeUserClaimsInIdToken" boolean NOT NULL,
"RequirePkce" boolean NOT NULL,
"AllowPlainTextPkce" boolean NOT NULL,
"RequireRequestObject" boolean NOT NULL,
"AllowAccessTokensViaBrowser" boolean NOT NULL,
"FrontChannelLogoutUri" character varying(2000) NULL,
"FrontChannelLogoutSessionRequired" boolean NOT NULL,
"BackChannelLogoutUri" character varying(2000) NULL,
"BackChannelLogoutSessionRequired" boolean NOT NULL,
"AllowOfflineAccess" boolean NOT NULL,
"IdentityTokenLifetime" integer NOT NULL,
"AllowedIdentityTokenSigningAlgorithms" character varying(100) NULL,
"AccessTokenLifetime" integer NOT NULL,
"AuthorizationCodeLifetime" integer NOT NULL,
"ConsentLifetime" integer NULL,
"AbsoluteRefreshTokenLifetime" integer NOT NULL,
"SlidingRefreshTokenLifetime" integer NOT NULL,
"RefreshTokenUsage" integer NOT NULL,
"UpdateAccessTokenClaimsOnRefresh" boolean NOT NULL,
"RefreshTokenExpiration" integer NOT NULL,
"AccessTokenType" integer NOT NULL,
"EnableLocalLogin" boolean NOT NULL,
"IncludeJwtId" boolean NOT NULL,
"AlwaysSendClientClaims" boolean NOT NULL,
"ClientClaimsPrefix" character varying(200) NULL,
"PairWiseSubjectSalt" character varying(200) NULL,
"UserSsoLifetime" integer NULL,
"UserCodeType" character varying(100) NULL,
"DeviceCodeLifetime" integer NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_IdentityServerClients" PRIMARY KEY ("Id")
);
CREATE TABLE "IdentityServerDeviceFlowCodes" (
"Id" uuid NOT NULL,
"DeviceCode" character varying(200) NOT NULL,
"UserCode" character varying(200) NOT NULL,
"SubjectId" character varying(200) NULL,
"SessionId" character varying(100) NULL,
"ClientId" character varying(200) NOT NULL,
"Description" character varying(200) NULL,
"Expiration" timestamp without time zone NOT NULL,
"Data" character varying(50000) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
CONSTRAINT "PK_IdentityServerDeviceFlowCodes" PRIMARY KEY ("Id")
);
CREATE TABLE "IdentityServerIdentityResources" (
"Id" uuid NOT NULL,
"Name" character varying(200) NOT NULL,
"DisplayName" character varying(200) NULL,
"Description" character varying(1000) NULL,
"Enabled" boolean NOT NULL,
"Required" boolean NOT NULL,
"Emphasize" boolean NOT NULL,
"ShowInDiscoveryDocument" boolean NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeleterId" uuid NULL,
"DeletionTime" timestamp without time zone NULL,
CONSTRAINT "PK_IdentityServerIdentityResources" PRIMARY KEY ("Id")
);
CREATE TABLE "IdentityServerPersistedGrants" (
"Key" character varying(200) NOT NULL,
"Type" character varying(50) NOT NULL,
"SubjectId" character varying(200) NULL,
"SessionId" character varying(100) NULL,
"ClientId" character varying(200) NOT NULL,
"Description" character varying(200) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"Expiration" timestamp without time zone NULL,
"ConsumedTime" timestamp without time zone NULL,
"Data" character varying(50000) NOT NULL,
"Id" uuid NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_IdentityServerPersistedGrants" PRIMARY KEY ("Key")
);
CREATE TABLE "AbpAuditLogActions" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"AuditLogId" uuid NOT NULL,
"ServiceName" character varying(256) NULL,
"MethodName" character varying(128) NULL,
"Parameters" character varying(2000) NULL,
"ExecutionTime" timestamp without time zone NOT NULL,
"ExecutionDuration" integer NOT NULL,
"ExtraProperties" text NULL,
CONSTRAINT "PK_AbpAuditLogActions" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId" FOREIGN KEY ("AuditLogId") REFERENCES "AbpAuditLogs" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpEntityChanges" (
"Id" uuid NOT NULL,
"AuditLogId" uuid NOT NULL,
"TenantId" uuid NULL,
"ChangeTime" timestamp without time zone NOT NULL,
"ChangeType" smallint NOT NULL,
"EntityTenantId" uuid NULL,
"EntityId" character varying(128) NOT NULL,
"EntityTypeFullName" character varying(128) NOT NULL,
"ExtraProperties" text NULL,
CONSTRAINT "PK_AbpEntityChanges" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId" FOREIGN KEY ("AuditLogId") REFERENCES "AbpAuditLogs" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpOrganizationUnitRoles" (
"RoleId" uuid NOT NULL,
"OrganizationUnitId" uuid NOT NULL,
"TenantId" uuid NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
CONSTRAINT "PK_AbpOrganizationUnitRoles" PRIMARY KEY ("OrganizationUnitId", "RoleId"),
CONSTRAINT "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~" FOREIGN KEY ("OrganizationUnitId") REFERENCES "AbpOrganizationUnits" ("Id") ON DELETE CASCADE,
CONSTRAINT "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AbpRoles" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpRoleClaims" (
"Id" uuid NOT NULL,
"RoleId" uuid NOT NULL,
"TenantId" uuid NULL,
"ClaimType" character varying(256) NOT NULL,
"ClaimValue" character varying(1024) NULL,
CONSTRAINT "PK_AbpRoleClaims" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpRoleClaims_AbpRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AbpRoles" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpTenantConnectionStrings" (
"TenantId" uuid NOT NULL,
"Name" character varying(64) NOT NULL,
"Value" character varying(1024) NOT NULL,
CONSTRAINT "PK_AbpTenantConnectionStrings" PRIMARY KEY ("TenantId", "Name"),
CONSTRAINT "FK_AbpTenantConnectionStrings_AbpTenants_TenantId" FOREIGN KEY ("TenantId") REFERENCES "AbpTenants" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpUserClaims" (
"Id" uuid NOT NULL,
"UserId" uuid NOT NULL,
"TenantId" uuid NULL,
"ClaimType" character varying(256) NOT NULL,
"ClaimValue" character varying(1024) NULL,
CONSTRAINT "PK_AbpUserClaims" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpUserClaims_AbpUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AbpUsers" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpUserLogins" (
"UserId" uuid NOT NULL,
"LoginProvider" character varying(64) NOT NULL,
"TenantId" uuid NULL,
"ProviderKey" character varying(196) NOT NULL,
"ProviderDisplayName" character varying(128) NULL,
CONSTRAINT "PK_AbpUserLogins" PRIMARY KEY ("UserId", "LoginProvider"),
CONSTRAINT "FK_AbpUserLogins_AbpUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AbpUsers" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpUserOrganizationUnits" (
"UserId" uuid NOT NULL,
"OrganizationUnitId" uuid NOT NULL,
"TenantId" uuid NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
CONSTRAINT "PK_AbpUserOrganizationUnits" PRIMARY KEY ("OrganizationUnitId", "UserId"),
CONSTRAINT "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~" FOREIGN KEY ("OrganizationUnitId") REFERENCES "AbpOrganizationUnits" ("Id") ON DELETE CASCADE,
CONSTRAINT "FK_AbpUserOrganizationUnits_AbpUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AbpUsers" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpUserRoles" (
"UserId" uuid NOT NULL,
"RoleId" uuid NOT NULL,
"TenantId" uuid NULL,
CONSTRAINT "PK_AbpUserRoles" PRIMARY KEY ("UserId", "RoleId"),
CONSTRAINT "FK_AbpUserRoles_AbpRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AbpRoles" ("Id") ON DELETE CASCADE,
CONSTRAINT "FK_AbpUserRoles_AbpUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AbpUsers" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpUserTokens" (
"UserId" uuid NOT NULL,
"LoginProvider" character varying(64) NOT NULL,
"Name" character varying(128) NOT NULL,
"TenantId" uuid NULL,
"Value" text NULL,
CONSTRAINT "PK_AbpUserTokens" PRIMARY KEY ("UserId", "LoginProvider", "Name"),
CONSTRAINT "FK_AbpUserTokens_AbpUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AbpUsers" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerApiResourceClaims" (
"Type" character varying(200) NOT NULL,
"ApiResourceId" uuid NOT NULL,
CONSTRAINT "PK_IdentityServerApiResourceClaims" PRIMARY KEY ("ApiResourceId", "Type"),
CONSTRAINT "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_~" FOREIGN KEY ("ApiResourceId") REFERENCES "IdentityServerApiResources" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerApiResourceProperties" (
"ApiResourceId" uuid NOT NULL,
"Key" character varying(250) NOT NULL,
"Value" character varying(2000) NOT NULL,
CONSTRAINT "PK_IdentityServerApiResourceProperties" PRIMARY KEY ("ApiResourceId", "Key", "Value"),
CONSTRAINT "FK_IdentityServerApiResourceProperties_IdentityServerApiResour~" FOREIGN KEY ("ApiResourceId") REFERENCES "IdentityServerApiResources" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerApiResourceScopes" (
"ApiResourceId" uuid NOT NULL,
"Scope" character varying(200) NOT NULL,
CONSTRAINT "PK_IdentityServerApiResourceScopes" PRIMARY KEY ("ApiResourceId", "Scope"),
CONSTRAINT "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_~" FOREIGN KEY ("ApiResourceId") REFERENCES "IdentityServerApiResources" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerApiResourceSecrets" (
"Type" character varying(250) NOT NULL,
"Value" character varying(4000) NOT NULL,
"ApiResourceId" uuid NOT NULL,
"Description" character varying(1000) NULL,
"Expiration" timestamp without time zone NULL,
CONSTRAINT "PK_IdentityServerApiResourceSecrets" PRIMARY KEY ("ApiResourceId", "Type", "Value"),
CONSTRAINT "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources~" FOREIGN KEY ("ApiResourceId") REFERENCES "IdentityServerApiResources" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerApiScopeClaims" (
"Type" character varying(200) NOT NULL,
"ApiScopeId" uuid NOT NULL,
CONSTRAINT "PK_IdentityServerApiScopeClaims" PRIMARY KEY ("ApiScopeId", "Type"),
CONSTRAINT "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiSco~" FOREIGN KEY ("ApiScopeId") REFERENCES "IdentityServerApiScopes" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerApiScopeProperties" (
"ApiScopeId" uuid NOT NULL,
"Key" character varying(250) NOT NULL,
"Value" character varying(2000) NOT NULL,
CONSTRAINT "PK_IdentityServerApiScopeProperties" PRIMARY KEY ("ApiScopeId", "Key", "Value"),
CONSTRAINT "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Ap~" FOREIGN KEY ("ApiScopeId") REFERENCES "IdentityServerApiScopes" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientClaims" (
"ClientId" uuid NOT NULL,
"Type" character varying(250) NOT NULL,
"Value" character varying(250) NOT NULL,
CONSTRAINT "PK_IdentityServerClientClaims" PRIMARY KEY ("ClientId", "Type", "Value"),
CONSTRAINT "FK_IdentityServerClientClaims_IdentityServerClients_ClientId" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientCorsOrigins" (
"ClientId" uuid NOT NULL,
"Origin" character varying(150) NOT NULL,
CONSTRAINT "PK_IdentityServerClientCorsOrigins" PRIMARY KEY ("ClientId", "Origin"),
CONSTRAINT "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Clien~" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientGrantTypes" (
"ClientId" uuid NOT NULL,
"GrantType" character varying(250) NOT NULL,
CONSTRAINT "PK_IdentityServerClientGrantTypes" PRIMARY KEY ("ClientId", "GrantType"),
CONSTRAINT "FK_IdentityServerClientGrantTypes_IdentityServerClients_Client~" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientIdPRestrictions" (
"ClientId" uuid NOT NULL,
"Provider" character varying(200) NOT NULL,
CONSTRAINT "PK_IdentityServerClientIdPRestrictions" PRIMARY KEY ("ClientId", "Provider"),
CONSTRAINT "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_C~" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientPostLogoutRedirectUris" (
"ClientId" uuid NOT NULL,
"PostLogoutRedirectUri" character varying(2000) NOT NULL,
CONSTRAINT "PK_IdentityServerClientPostLogoutRedirectUris" PRIMARY KEY ("ClientId", "PostLogoutRedirectUri"),
CONSTRAINT "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCl~" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientProperties" (
"ClientId" uuid NOT NULL,
"Key" character varying(250) NOT NULL,
"Value" character varying(2000) NOT NULL,
CONSTRAINT "PK_IdentityServerClientProperties" PRIMARY KEY ("ClientId", "Key", "Value"),
CONSTRAINT "FK_IdentityServerClientProperties_IdentityServerClients_Client~" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientRedirectUris" (
"ClientId" uuid NOT NULL,
"RedirectUri" character varying(2000) NOT NULL,
CONSTRAINT "PK_IdentityServerClientRedirectUris" PRIMARY KEY ("ClientId", "RedirectUri"),
CONSTRAINT "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clie~" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientScopes" (
"ClientId" uuid NOT NULL,
"Scope" character varying(200) NOT NULL,
CONSTRAINT "PK_IdentityServerClientScopes" PRIMARY KEY ("ClientId", "Scope"),
CONSTRAINT "FK_IdentityServerClientScopes_IdentityServerClients_ClientId" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerClientSecrets" (
"Type" character varying(250) NOT NULL,
"Value" character varying(4000) NOT NULL,
"ClientId" uuid NOT NULL,
"Description" character varying(2000) NULL,
"Expiration" timestamp without time zone NULL,
CONSTRAINT "PK_IdentityServerClientSecrets" PRIMARY KEY ("ClientId", "Type", "Value"),
CONSTRAINT "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId" FOREIGN KEY ("ClientId") REFERENCES "IdentityServerClients" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerIdentityResourceClaims" (
"Type" character varying(200) NOT NULL,
"IdentityResourceId" uuid NOT NULL,
CONSTRAINT "PK_IdentityServerIdentityResourceClaims" PRIMARY KEY ("IdentityResourceId", "Type"),
CONSTRAINT "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentity~" FOREIGN KEY ("IdentityResourceId") REFERENCES "IdentityServerIdentityResources" ("Id") ON DELETE CASCADE
);
CREATE TABLE "IdentityServerIdentityResourceProperties" (
"IdentityResourceId" uuid NOT NULL,
"Key" character varying(250) NOT NULL,
"Value" character varying(2000) NOT NULL,
CONSTRAINT "PK_IdentityServerIdentityResourceProperties" PRIMARY KEY ("IdentityResourceId", "Key", "Value"),
CONSTRAINT "FK_IdentityServerIdentityResourceProperties_IdentityServerIden~" FOREIGN KEY ("IdentityResourceId") REFERENCES "IdentityServerIdentityResources" ("Id") ON DELETE CASCADE
);
CREATE TABLE "AbpEntityPropertyChanges" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"EntityChangeId" uuid NOT NULL,
"NewValue" character varying(512) NULL,
"OriginalValue" character varying(512) NULL,
"PropertyName" character varying(128) NOT NULL,
"PropertyTypeFullName" character varying(64) NOT NULL,
CONSTRAINT "PK_AbpEntityPropertyChanges" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId" FOREIGN KEY ("EntityChangeId") REFERENCES "AbpEntityChanges" ("Id") ON DELETE CASCADE
);
CREATE INDEX "IX_AbpAuditLogActions_AuditLogId" ON "AbpAuditLogActions" ("AuditLogId");
CREATE INDEX "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~" ON "AbpAuditLogActions" ("TenantId", "ServiceName", "MethodName", "ExecutionTime");
CREATE INDEX "IX_AbpAuditLogs_TenantId_ExecutionTime" ON "AbpAuditLogs" ("TenantId", "ExecutionTime");
CREATE INDEX "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime" ON "AbpAuditLogs" ("TenantId", "UserId", "ExecutionTime");
CREATE INDEX "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime" ON "AbpBackgroundJobs" ("IsAbandoned", "NextTryTime");
CREATE INDEX "IX_AbpEntityChanges_AuditLogId" ON "AbpEntityChanges" ("AuditLogId");
CREATE INDEX "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId" ON "AbpEntityChanges" ("TenantId", "EntityTypeFullName", "EntityId");
CREATE INDEX "IX_AbpEntityPropertyChanges_EntityChangeId" ON "AbpEntityPropertyChanges" ("EntityChangeId");
CREATE UNIQUE INDEX "IX_AbpFeatureValues_Name_ProviderName_ProviderKey" ON "AbpFeatureValues" ("Name", "ProviderName", "ProviderKey");
CREATE UNIQUE INDEX "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~" ON "AbpLinkUsers" ("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId");
CREATE INDEX "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId" ON "AbpOrganizationUnitRoles" ("RoleId", "OrganizationUnitId");
CREATE INDEX "IX_AbpOrganizationUnits_Code" ON "AbpOrganizationUnits" ("Code");
CREATE INDEX "IX_AbpOrganizationUnits_ParentId" ON "AbpOrganizationUnits" ("ParentId");
CREATE UNIQUE INDEX "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey" ON "AbpPermissionGrants" ("TenantId", "Name", "ProviderName", "ProviderKey");
CREATE INDEX "IX_AbpRoleClaims_RoleId" ON "AbpRoleClaims" ("RoleId");
CREATE INDEX "IX_AbpRoles_NormalizedName" ON "AbpRoles" ("NormalizedName");
CREATE INDEX "IX_AbpSecurityLogs_TenantId_Action" ON "AbpSecurityLogs" ("TenantId", "Action");
CREATE INDEX "IX_AbpSecurityLogs_TenantId_ApplicationName" ON "AbpSecurityLogs" ("TenantId", "ApplicationName");
CREATE INDEX "IX_AbpSecurityLogs_TenantId_Identity" ON "AbpSecurityLogs" ("TenantId", "Identity");
CREATE INDEX "IX_AbpSecurityLogs_TenantId_UserId" ON "AbpSecurityLogs" ("TenantId", "UserId");
CREATE UNIQUE INDEX "IX_AbpSettings_Name_ProviderName_ProviderKey" ON "AbpSettings" ("Name", "ProviderName", "ProviderKey");
CREATE INDEX "IX_AbpTenants_Name" ON "AbpTenants" ("Name");
CREATE INDEX "IX_AbpUserClaims_UserId" ON "AbpUserClaims" ("UserId");
CREATE INDEX "IX_AbpUserLogins_LoginProvider_ProviderKey" ON "AbpUserLogins" ("LoginProvider", "ProviderKey");
CREATE INDEX "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId" ON "AbpUserOrganizationUnits" ("UserId", "OrganizationUnitId");
CREATE INDEX "IX_AbpUserRoles_RoleId_UserId" ON "AbpUserRoles" ("RoleId", "UserId");
CREATE INDEX "IX_AbpUsers_Email" ON "AbpUsers" ("Email");
CREATE INDEX "IX_AbpUsers_NormalizedEmail" ON "AbpUsers" ("NormalizedEmail");
CREATE INDEX "IX_AbpUsers_NormalizedUserName" ON "AbpUsers" ("NormalizedUserName");
CREATE INDEX "IX_AbpUsers_UserName" ON "AbpUsers" ("UserName");
CREATE UNIQUE INDEX "IX_Auth_Department_Code" ON "Auth_Department" ("Code");
CREATE UNIQUE INDEX "IX_Auth_Menu_Code" ON "Auth_Menu" ("Code");
CREATE UNIQUE INDEX "IX_Auth_UserMenu_UserId_MenuCode" ON "Auth_UserMenu" ("UserId", "MenuCode");
CREATE UNIQUE INDEX "IX_Auth_UserWorkGroup_WorkGroupCode_UserId" ON "Auth_UserWorkGroup" ("WorkGroupCode", "UserId");
CREATE INDEX "IX_IdentityServerClients_ClientId" ON "IdentityServerClients" ("ClientId");
CREATE UNIQUE INDEX "IX_IdentityServerDeviceFlowCodes_DeviceCode" ON "IdentityServerDeviceFlowCodes" ("DeviceCode");
CREATE INDEX "IX_IdentityServerDeviceFlowCodes_Expiration" ON "IdentityServerDeviceFlowCodes" ("Expiration");
CREATE INDEX "IX_IdentityServerDeviceFlowCodes_UserCode" ON "IdentityServerDeviceFlowCodes" ("UserCode");
CREATE INDEX "IX_IdentityServerPersistedGrants_Expiration" ON "IdentityServerPersistedGrants" ("Expiration");
CREATE INDEX "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type" ON "IdentityServerPersistedGrants" ("SubjectId", "ClientId", "Type");
CREATE INDEX "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type" ON "IdentityServerPersistedGrants" ("SubjectId", "SessionId", "Type");

4
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Win_in.Sfs.Basedata.HttpApi.Host.csproj

@ -43,8 +43,8 @@
</PackageReference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<!--<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\Basedata.zip' -Force)" />
</Target>
</Target>-->
</Project>

258
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.BasedataDbContext.sql

@ -17,8 +17,7 @@ CREATE TABLE [Basedata_AQL] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_AQL] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Area] (
@ -38,8 +37,7 @@ CREATE TABLE [Basedata_Area] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Area] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Bom] (
@ -65,8 +63,7 @@ CREATE TABLE [Basedata_Bom] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Bom] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Calendar] (
@ -84,8 +81,7 @@ CREATE TABLE [Basedata_Calendar] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Calendar] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Category] (
@ -102,8 +98,7 @@ CREATE TABLE [Basedata_Category] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Category] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Currency] (
@ -121,8 +116,7 @@ CREATE TABLE [Basedata_Currency] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Currency] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_CurrencyExchange] (
@ -141,8 +135,7 @@ CREATE TABLE [Basedata_CurrencyExchange] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_CurrencyExchange] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Customer] (
@ -169,8 +162,7 @@ CREATE TABLE [Basedata_Customer] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Customer] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_CustomerAddress] (
@ -193,8 +185,7 @@ CREATE TABLE [Basedata_CustomerAddress] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(1024) NULL,
CONSTRAINT [PK_Basedata_CustomerAddress] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_CustomerItem] (
@ -216,8 +207,7 @@ CREATE TABLE [Basedata_CustomerItem] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_CustomerItem] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Dict] (
@ -234,8 +224,7 @@ CREATE TABLE [Basedata_Dict] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Dict] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Dock] (
@ -254,8 +243,7 @@ CREATE TABLE [Basedata_Dock] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Dock] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_DocumentSetting] (
@ -277,8 +265,7 @@ CREATE TABLE [Basedata_DocumentSetting] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_DocumentSetting] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ErpLocation] (
@ -297,8 +284,7 @@ CREATE TABLE [Basedata_ErpLocation] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ErpLocation] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_InterfaceCalendar] (
@ -320,8 +306,7 @@ CREATE TABLE [Basedata_InterfaceCalendar] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(max) NULL,
CONSTRAINT [PK_Basedata_InterfaceCalendar] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemBasic] (
@ -360,8 +345,7 @@ CREATE TABLE [Basedata_ItemBasic] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemBasic] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemCategory] (
@ -378,8 +362,7 @@ CREATE TABLE [Basedata_ItemCategory] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemCategory] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemGuideBook] (
@ -399,8 +382,7 @@ CREATE TABLE [Basedata_ItemGuideBook] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemGuideBook] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemPack] (
@ -420,8 +402,7 @@ CREATE TABLE [Basedata_ItemPack] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemPack] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemQuality] (
@ -440,8 +421,7 @@ CREATE TABLE [Basedata_ItemQuality] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemQuality] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemSafetyStock] (
@ -465,8 +445,7 @@ CREATE TABLE [Basedata_ItemSafetyStock] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemSafetyStock] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ItemStoreRelation] (
@ -492,8 +471,7 @@ CREATE TABLE [Basedata_ItemStoreRelation] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ItemStoreRelation] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Location] (
@ -538,8 +516,7 @@ CREATE TABLE [Basedata_Location] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Location] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_LocationGroup] (
@ -578,8 +555,7 @@ CREATE TABLE [Basedata_LocationGroup] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_LocationGroup] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Machine] (
@ -599,8 +575,7 @@ CREATE TABLE [Basedata_Machine] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Machine] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ProductionLine] (
@ -622,8 +597,7 @@ CREATE TABLE [Basedata_ProductionLine] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ProductionLine] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_ProductionLineItem] (
@ -639,8 +613,7 @@ CREATE TABLE [Basedata_ProductionLineItem] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_ProductionLineItem] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Project] (
@ -660,8 +633,7 @@ CREATE TABLE [Basedata_Project] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Project] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_PurchasePriceSheet] (
@ -680,8 +652,7 @@ CREATE TABLE [Basedata_PurchasePriceSheet] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_PurchasePriceSheet] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_SalePriceSheet] (
@ -700,8 +671,7 @@ CREATE TABLE [Basedata_SalePriceSheet] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_SalePriceSheet] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Shift] (
@ -721,8 +691,7 @@ CREATE TABLE [Basedata_Shift] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Shift] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_StdCostPriceSheet] (
@ -741,8 +710,7 @@ CREATE TABLE [Basedata_StdCostPriceSheet] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_StdCostPriceSheet] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Supplier] (
@ -771,8 +739,7 @@ CREATE TABLE [Basedata_Supplier] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Supplier] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_SupplierItem] (
@ -795,8 +762,7 @@ CREATE TABLE [Basedata_SupplierItem] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_SupplierItem] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_SupplierTimeWindow] (
@ -814,8 +780,7 @@ CREATE TABLE [Basedata_SupplierTimeWindow] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_SupplierTimeWindow] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Team] (
@ -833,8 +798,7 @@ CREATE TABLE [Basedata_Team] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Team] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_TransactionType] (
@ -865,8 +829,7 @@ CREATE TABLE [Basedata_TransactionType] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_TransactionType] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Uom] (
@ -884,8 +847,7 @@ CREATE TABLE [Basedata_Uom] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Uom] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_Warehouse] (
@ -902,8 +864,7 @@ CREATE TABLE [Basedata_Warehouse] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_Warehouse] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_WorkGroup] (
@ -921,8 +882,7 @@ CREATE TABLE [Basedata_WorkGroup] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_WorkGroup] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_WorkShop] (
@ -939,8 +899,7 @@ CREATE TABLE [Basedata_WorkShop] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_WorkShop] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_WorkStation] (
@ -961,8 +920,7 @@ CREATE TABLE [Basedata_WorkStation] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Basedata_WorkStation] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Basedata_DictItem] (
@ -981,179 +939,135 @@ CREATE TABLE [Basedata_DictItem] (
[LastModifierId] uniqueidentifier NULL,
CONSTRAINT [PK_Basedata_DictItem] PRIMARY KEY ([Id]),
CONSTRAINT [FK_Basedata_DictItem_Basedata_Dict_MasterId] FOREIGN KEY ([MasterId]) REFERENCES [Basedata_Dict] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE UNIQUE INDEX [IX_Basedata_AQL_SupplierCode_ItemCode_FloorQty] ON [Basedata_AQL] ([SupplierCode], [ItemCode], [FloorQty]);
GO
CREATE UNIQUE INDEX [IX_Basedata_AQL_SupplierCode_ItemCode_FloorQty] ON [Basedata_AQL] ([SupplierCode], [ItemCode], [FloorQty])
CREATE UNIQUE INDEX [IX_Basedata_Area_Code] ON [Basedata_Area] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Area_Code] ON [Basedata_Area] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_Bom_Product_Component] ON [Basedata_Bom] ([Product], [Component]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Bom_Product_Component] ON [Basedata_Bom] ([Product], [Component])
CREATE UNIQUE INDEX [IX_Basedata_Calendar_Module] ON [Basedata_Calendar] ([Module]) WHERE [Module] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_Basedata_Calendar_Module] ON [Basedata_Calendar] ([Module]) WHERE [Module] IS NOT NULL
CREATE UNIQUE INDEX [IX_Basedata_Category_Code] ON [Basedata_Category] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Category_Code] ON [Basedata_Category] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_Currency_Code] ON [Basedata_Currency] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Currency_Code] ON [Basedata_Currency] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_CurrencyExchange_CurrencyId_BasicCurrencyId] ON [Basedata_CurrencyExchange] ([CurrencyId], [BasicCurrencyId]);
GO
CREATE UNIQUE INDEX [IX_Basedata_CurrencyExchange_CurrencyId_BasicCurrencyId] ON [Basedata_CurrencyExchange] ([CurrencyId], [BasicCurrencyId])
CREATE UNIQUE INDEX [IX_Basedata_Customer_Code] ON [Basedata_Customer] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Customer_Code] ON [Basedata_Customer] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_CustomerAddress_Code_CustomerCode] ON [Basedata_CustomerAddress] ([Code], [CustomerCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_CustomerAddress_Code_CustomerCode] ON [Basedata_CustomerAddress] ([Code], [CustomerCode])
CREATE UNIQUE INDEX [IX_Basedata_CustomerItem_CustomerCode_ItemCode] ON [Basedata_CustomerItem] ([CustomerCode], [ItemCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_CustomerItem_CustomerCode_ItemCode] ON [Basedata_CustomerItem] ([CustomerCode], [ItemCode])
CREATE UNIQUE INDEX [IX_Basedata_Dict_Code] ON [Basedata_Dict] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Dict_Code] ON [Basedata_Dict] ([Code])
CREATE INDEX [IX_Basedata_DictItem_MasterId] ON [Basedata_DictItem] ([MasterId]);
GO
CREATE INDEX [IX_Basedata_DictItem_MasterId] ON [Basedata_DictItem] ([MasterId])
CREATE UNIQUE INDEX [IX_Basedata_Dock_Code] ON [Basedata_Dock] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Dock_Code] ON [Basedata_Dock] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_DocumentSetting_Code] ON [Basedata_DocumentSetting] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_DocumentSetting_Code] ON [Basedata_DocumentSetting] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_ErpLocation_Code] ON [Basedata_ErpLocation] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ErpLocation_Code] ON [Basedata_ErpLocation] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_InterfaceCalendar_Code] ON [Basedata_InterfaceCalendar] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_InterfaceCalendar_Code] ON [Basedata_InterfaceCalendar] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_ItemBasic_Code] ON [Basedata_ItemBasic] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemBasic_Code] ON [Basedata_ItemBasic] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_ItemCategory_CategoryCode_ItemCode] ON [Basedata_ItemCategory] ([CategoryCode], [ItemCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemCategory_CategoryCode_ItemCode] ON [Basedata_ItemCategory] ([CategoryCode], [ItemCode])
CREATE UNIQUE INDEX [IX_Basedata_ItemGuideBook_ItemCode] ON [Basedata_ItemGuideBook] ([ItemCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemGuideBook_ItemCode] ON [Basedata_ItemGuideBook] ([ItemCode])
CREATE UNIQUE INDEX [IX_Basedata_ItemPack_ItemCode_PackCode] ON [Basedata_ItemPack] ([ItemCode], [PackCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemPack_ItemCode_PackCode] ON [Basedata_ItemPack] ([ItemCode], [PackCode])
CREATE UNIQUE INDEX [IX_Basedata_ItemQuality_ItemCode_SupplierCode] ON [Basedata_ItemQuality] ([ItemCode], [SupplierCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemQuality_ItemCode_SupplierCode] ON [Basedata_ItemQuality] ([ItemCode], [SupplierCode])
CREATE UNIQUE INDEX [IX_Basedata_ItemSafetyStock_ItemCode_WarehouseCode_StoreRelationType_StoreValue] ON [Basedata_ItemSafetyStock] ([ItemCode], [WarehouseCode], [StoreRelationType], [StoreValue]) WHERE [StoreValue] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemSafetyStock_ItemCode_WarehouseCode_StoreRelationType_StoreValue] ON [Basedata_ItemSafetyStock] ([ItemCode], [WarehouseCode], [StoreRelationType], [StoreValue]) WHERE [StoreValue] IS NOT NULL
CREATE UNIQUE INDEX [IX_Basedata_ItemStoreRelation_ItemCode_StoreRelationType_StoreValue] ON [Basedata_ItemStoreRelation] ([ItemCode], [StoreRelationType], [StoreValue]) WHERE [StoreValue] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_Basedata_ItemStoreRelation_ItemCode_StoreRelationType_StoreValue] ON [Basedata_ItemStoreRelation] ([ItemCode], [StoreRelationType], [StoreValue]) WHERE [StoreValue] IS NOT NULL
CREATE UNIQUE INDEX [IX_Basedata_Location_Code] ON [Basedata_Location] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Location_Code] ON [Basedata_Location] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_LocationGroup_Code] ON [Basedata_LocationGroup] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_LocationGroup_Code] ON [Basedata_LocationGroup] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_Machine_Code] ON [Basedata_Machine] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Machine_Code] ON [Basedata_Machine] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_ProductionLine_Code] ON [Basedata_ProductionLine] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ProductionLine_Code] ON [Basedata_ProductionLine] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode] ON [Basedata_ProductionLineItem] ([ProdLineCode], [ItemCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode] ON [Basedata_ProductionLineItem] ([ProdLineCode], [ItemCode])
CREATE UNIQUE INDEX [IX_Basedata_Project_Code] ON [Basedata_Project] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Project_Code] ON [Basedata_Project] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_PurchasePriceSheet_Code] ON [Basedata_PurchasePriceSheet] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_PurchasePriceSheet_Code] ON [Basedata_PurchasePriceSheet] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_SalePriceSheet_Code_CustomerId] ON [Basedata_SalePriceSheet] ([Code], [CustomerId]);
GO
CREATE UNIQUE INDEX [IX_Basedata_SalePriceSheet_Code_CustomerId] ON [Basedata_SalePriceSheet] ([Code], [CustomerId])
CREATE UNIQUE INDEX [IX_Basedata_Shift_Code] ON [Basedata_Shift] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Shift_Code] ON [Basedata_Shift] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_StdCostPriceSheet_Code_SupplierId] ON [Basedata_StdCostPriceSheet] ([Code], [SupplierId]);
GO
CREATE UNIQUE INDEX [IX_Basedata_StdCostPriceSheet_Code_SupplierId] ON [Basedata_StdCostPriceSheet] ([Code], [SupplierId])
CREATE UNIQUE INDEX [IX_Basedata_Supplier_Code] ON [Basedata_Supplier] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Supplier_Code] ON [Basedata_Supplier] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_SupplierItem_SupplierCode_ItemCode] ON [Basedata_SupplierItem] ([SupplierCode], [ItemCode]);
GO
CREATE UNIQUE INDEX [IX_Basedata_SupplierItem_SupplierCode_ItemCode] ON [Basedata_SupplierItem] ([SupplierCode], [ItemCode])
CREATE UNIQUE INDEX [IX_Basedata_SupplierTimeWindow_SupplierCode_TimeSlot_Week] ON [Basedata_SupplierTimeWindow] ([SupplierCode], [TimeSlot], [Week]);
GO
CREATE UNIQUE INDEX [IX_Basedata_SupplierTimeWindow_SupplierCode_TimeSlot_Week] ON [Basedata_SupplierTimeWindow] ([SupplierCode], [TimeSlot], [Week])
CREATE UNIQUE INDEX [IX_Basedata_Team_Code] ON [Basedata_Team] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Team_Code] ON [Basedata_Team] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_TransactionType_TransType_TransSubType] ON [Basedata_TransactionType] ([TransType], [TransSubType]);
GO
CREATE UNIQUE INDEX [IX_Basedata_TransactionType_TransType_TransSubType] ON [Basedata_TransactionType] ([TransType], [TransSubType])
CREATE UNIQUE INDEX [IX_Basedata_Uom_Code] ON [Basedata_Uom] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Uom_Code] ON [Basedata_Uom] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_Warehouse_Code] ON [Basedata_Warehouse] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_Warehouse_Code] ON [Basedata_Warehouse] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_WorkGroup_Code] ON [Basedata_WorkGroup] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_WorkGroup_Code] ON [Basedata_WorkGroup] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_WorkShop_Code] ON [Basedata_WorkShop] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_WorkShop_Code] ON [Basedata_WorkShop] ([Code])
CREATE UNIQUE INDEX [IX_Basedata_WorkStation_Code] ON [Basedata_WorkStation] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Basedata_WorkStation_Code] ON [Basedata_WorkStation] ([Code])

1073
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.BasedataDbContext.sql

File diff suppressed because it is too large

24
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.FileStorageDbContext.sql

@ -5,8 +5,7 @@ CREATE TABLE [AbpBlobContainers] (
[ExtraProperties] nvarchar(max) NULL,
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpBlobContainers] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [FileStorage_DataExportTask] (
@ -29,8 +28,7 @@ CREATE TABLE [FileStorage_DataExportTask] (
[EndTime] datetime2 NULL,
[Status] nvarchar(64) NOT NULL,
CONSTRAINT [PK_FileStorage_DataExportTask] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [FileStorage_DataImportTask] (
@ -55,8 +53,7 @@ CREATE TABLE [FileStorage_DataImportTask] (
[EndTime] datetime2 NULL,
[Status] nvarchar(64) NOT NULL,
CONSTRAINT [PK_FileStorage_DataImportTask] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [FileStorage_File] (
@ -73,8 +70,7 @@ CREATE TABLE [FileStorage_File] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(max) NULL,
CONSTRAINT [PK_FileStorage_File] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [AbpBlobs] (
@ -87,19 +83,15 @@ CREATE TABLE [AbpBlobs] (
[ConcurrencyStamp] nvarchar(40) NULL,
CONSTRAINT [PK_AbpBlobs] PRIMARY KEY ([Id]),
CONSTRAINT [FK_AbpBlobs_AbpBlobContainers_ContainerId] FOREIGN KEY ([ContainerId]) REFERENCES [AbpBlobContainers] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE INDEX [IX_AbpBlobContainers_TenantId_Name] ON [AbpBlobContainers] ([TenantId], [Name]);
GO
CREATE INDEX [IX_AbpBlobContainers_TenantId_Name] ON [AbpBlobContainers] ([TenantId], [Name])
CREATE INDEX [IX_AbpBlobs_ContainerId] ON [AbpBlobs] ([ContainerId]);
GO
CREATE INDEX [IX_AbpBlobs_ContainerId] ON [AbpBlobs] ([ContainerId])
CREATE INDEX [IX_AbpBlobs_TenantId_ContainerId_Name] ON [AbpBlobs] ([TenantId], [ContainerId], [Name]);
GO
CREATE INDEX [IX_AbpBlobs_TenantId_ContainerId_Name] ON [AbpBlobs] ([TenantId], [ContainerId], [Name])

42
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.LabelDbContext.sql

@ -11,8 +11,7 @@ CREATE TABLE [Label_CountLabel] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_CountLabel] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Label_InventoryLabel] (
@ -59,8 +58,7 @@ CREATE TABLE [Label_InventoryLabel] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_InventoryLabel] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Label_LabelDefinition] (
@ -82,8 +80,7 @@ CREATE TABLE [Label_LabelDefinition] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_LabelDefinition] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Label_PalletCode] (
@ -99,8 +96,7 @@ CREATE TABLE [Label_PalletCode] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_PalletCode] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Label_PalletLabel] (
@ -122,8 +118,7 @@ CREATE TABLE [Label_PalletLabel] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_PalletLabel] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Label_SaleLabel] (
@ -158,8 +153,7 @@ CREATE TABLE [Label_SaleLabel] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_SaleLabel] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Label_SerialCode] (
@ -175,35 +169,27 @@ CREATE TABLE [Label_SerialCode] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Label_SerialCode] PRIMARY KEY ([Id])
);
GO
)
CREATE UNIQUE INDEX [IX_Label_CountLabel_RuleCode_CountNumber] ON [Label_CountLabel] ([RuleCode], [CountNumber]);
GO
CREATE UNIQUE INDEX [IX_Label_CountLabel_RuleCode_CountNumber] ON [Label_CountLabel] ([RuleCode], [CountNumber])
CREATE UNIQUE INDEX [IX_Label_InventoryLabel_Code] ON [Label_InventoryLabel] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Label_InventoryLabel_Code] ON [Label_InventoryLabel] ([Code])
CREATE UNIQUE INDEX [IX_Label_LabelDefinition_Code] ON [Label_LabelDefinition] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Label_LabelDefinition_Code] ON [Label_LabelDefinition] ([Code])
CREATE UNIQUE INDEX [IX_Label_PalletCode_RuleCode_PalletlNumber] ON [Label_PalletCode] ([RuleCode], [PalletlNumber]);
GO
CREATE UNIQUE INDEX [IX_Label_PalletCode_RuleCode_PalletlNumber] ON [Label_PalletCode] ([RuleCode], [PalletlNumber])
CREATE UNIQUE INDEX [IX_Label_PalletLabel_Code] ON [Label_PalletLabel] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Label_PalletLabel_Code] ON [Label_PalletLabel] ([Code])
CREATE UNIQUE INDEX [IX_Label_SaleLabel_Code] ON [Label_SaleLabel] ([Code]);
GO
CREATE UNIQUE INDEX [IX_Label_SaleLabel_Code] ON [Label_SaleLabel] ([Code])
CREATE UNIQUE INDEX [IX_Label_SerialCode_RuleCode_SerialNumber] ON [Label_SerialCode] ([RuleCode], [SerialNumber]);
GO
CREATE UNIQUE INDEX [IX_Label_SerialCode_RuleCode_SerialNumber] ON [Label_SerialCode] ([RuleCode], [SerialNumber])

36
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.MessageDbContext.sql

@ -15,8 +15,7 @@ CREATE TABLE [Message_Announcement] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Message_Announcement] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Message_MessageType] (
@ -36,8 +35,7 @@ CREATE TABLE [Message_MessageType] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Message_MessageType] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Message_MessageTypeSubscribe] (
@ -55,8 +53,7 @@ CREATE TABLE [Message_MessageTypeSubscribe] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Message_MessageTypeSubscribe] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Message_NotifyMessage] (
@ -75,8 +72,7 @@ CREATE TABLE [Message_NotifyMessage] (
[MessageLevel] nvarchar(64) NOT NULL,
[SendTime] datetime2 NOT NULL,
CONSTRAINT [PK_Message_NotifyMessage] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Message_PrivateMessage] (
@ -100,8 +96,7 @@ CREATE TABLE [Message_PrivateMessage] (
[MessageLevel] nvarchar(64) NOT NULL,
[SendTime] datetime2 NOT NULL,
CONSTRAINT [PK_Message_PrivateMessage] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Message_UserNotifyMessage] (
@ -127,31 +122,24 @@ CREATE TABLE [Message_UserNotifyMessage] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Message_UserNotifyMessage] PRIMARY KEY ([Id])
);
GO
)
CREATE INDEX [IX_Message_Announcement_Title] ON [Message_Announcement] ([Title]);
GO
CREATE INDEX [IX_Message_Announcement_Title] ON [Message_Announcement] ([Title])
CREATE INDEX [IX_Message_MessageType_MessageTypeCode] ON [Message_MessageType] ([MessageTypeCode]);
GO
CREATE INDEX [IX_Message_MessageType_MessageTypeCode] ON [Message_MessageType] ([MessageTypeCode])
CREATE INDEX [IX_Message_MessageTypeSubscribe_UserId_MessageTypeId] ON [Message_MessageTypeSubscribe] ([UserId], [MessageTypeId]);
GO
CREATE INDEX [IX_Message_MessageTypeSubscribe_UserId_MessageTypeId] ON [Message_MessageTypeSubscribe] ([UserId], [MessageTypeId])
CREATE INDEX [IX_Message_NotifyMessage_Title] ON [Message_NotifyMessage] ([Title]);
GO
CREATE INDEX [IX_Message_NotifyMessage_Title] ON [Message_NotifyMessage] ([Title])
CREATE INDEX [IX_Message_PrivateMessage_FromUserId_ToUserId_Title] ON [Message_PrivateMessage] ([FromUserId], [ToUserId], [Title]);
GO
CREATE INDEX [IX_Message_PrivateMessage_FromUserId_ToUserId_Title] ON [Message_PrivateMessage] ([FromUserId], [ToUserId], [Title])
CREATE INDEX [IX_Message_UserNotifyMessage_UserId_MessageId] ON [Message_UserNotifyMessage] ([UserId], [MessageId]);
GO
CREATE INDEX [IX_Message_UserNotifyMessage_UserId_MessageId] ON [Message_UserNotifyMessage] ([UserId], [MessageId])

97
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.FileStorageDbContext.sql

@ -0,0 +1,97 @@
CREATE TABLE "AbpBlobContainers" (
"Id" uuid NOT NULL,
"TenantId" uuid NULL,
"Name" character varying(128) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpBlobContainers" PRIMARY KEY ("Id")
);
CREATE TABLE "FileStorage_DataExportTask" (
"Id" uuid NOT NULL,
"ExportFileBlobName" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
"Function" character varying(64) NOT NULL,
"Route" character varying(64) NOT NULL,
"RequestParam" text NULL,
"ReturnResult" text NULL,
"Worker" character varying(64) NULL,
"BeginTime" timestamp without time zone NULL,
"EndTime" timestamp without time zone NULL,
"Status" character varying(64) NOT NULL,
CONSTRAINT "PK_FileStorage_DataExportTask" PRIMARY KEY ("Id")
);
CREATE TABLE "FileStorage_DataImportTask" (
"Id" uuid NOT NULL,
"ImportFileBlobName" character varying(64) NOT NULL,
"ImportReportBlobName" character varying(64) NULL,
"ImportStatus" integer NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
"Function" character varying(64) NOT NULL,
"Route" character varying(64) NOT NULL,
"RequestParam" text NULL,
"ReturnResult" text NULL,
"Worker" character varying(64) NULL,
"BeginTime" timestamp without time zone NULL,
"EndTime" timestamp without time zone NULL,
"Status" character varying(64) NOT NULL,
CONSTRAINT "PK_FileStorage_DataImportTask" PRIMARY KEY ("Id")
);
CREATE TABLE "FileStorage_File" (
"Id" uuid NOT NULL,
"FileName" character varying(1024) NOT NULL,
"BlobName" character varying(1024) NOT NULL,
"ByteSize" bigint NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" text NULL,
CONSTRAINT "PK_FileStorage_File" PRIMARY KEY ("Id")
);
CREATE TABLE "AbpBlobs" (
"Id" uuid NOT NULL,
"ContainerId" uuid NOT NULL,
"TenantId" uuid NULL,
"Name" character varying(256) NOT NULL,
"Content" bytea NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
CONSTRAINT "PK_AbpBlobs" PRIMARY KEY ("Id"),
CONSTRAINT "FK_AbpBlobs_AbpBlobContainers_ContainerId" FOREIGN KEY ("ContainerId") REFERENCES "AbpBlobContainers" ("Id") ON DELETE CASCADE
);
CREATE INDEX "IX_AbpBlobContainers_TenantId_Name" ON "AbpBlobContainers" ("TenantId", "Name");
CREATE INDEX "IX_AbpBlobs_ContainerId" ON "AbpBlobs" ("ContainerId");
CREATE INDEX "IX_AbpBlobs_TenantId_ContainerId_Name" ON "AbpBlobs" ("TenantId", "ContainerId", "Name");

195
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.LabelDbContext.sql

@ -0,0 +1,195 @@
CREATE TABLE "Label_CountLabel" (
"Id" uuid NOT NULL,
"RuleCode" character varying(64) NOT NULL,
"CountNumber" integer NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_CountLabel" PRIMARY KEY ("Id")
);
CREATE TABLE "Label_InventoryLabel" (
"Id" uuid NOT NULL,
"Code" character varying(64) NOT NULL,
"LabelType" character varying(64) NOT NULL,
"FullBarcodeString" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"ItemName" text NULL,
"ItemDesc1" text NULL,
"ItemDesc2" text NULL,
"Lot" character varying(64) NOT NULL,
"SupplierBatch" text NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"StdPackQty" numeric(18,6) NOT NULL,
"Uom" character varying(64) NULL,
"Qty" numeric(18,6) NOT NULL,
"LabelStatus" character varying(64) NOT NULL,
"RecommendLocationCode" character varying(64) NULL,
"LocationErpCode" text NULL,
"ContainerCode" character varying(64) NULL,
"QualityInfo_QLevel" character varying(64) NULL,
"QualityInfo_QualityFile" character varying(64) NULL,
"PurchaseInfo_SupplierCode" character varying(64) NULL,
"PurchaseInfo_PoNumber" character varying(64) NULL,
"PurchaseInfo_RpNumber" character varying(64) NULL,
"PurchaseInfo_AsnNumber" character varying(64) NULL,
"ProductionInfo_ProdLine" character varying(64) NULL,
"ProductionInfo_Team" character varying(64) NULL,
"ProductionInfo_Shift" character varying(64) NULL,
"Specifications" text NULL,
"SupplierName" text NULL,
"SupplierSimpleName" text NULL,
"SupplierItemCode" text NULL,
"SupplierItemName" text NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_InventoryLabel" PRIMARY KEY ("Id")
);
CREATE TABLE "Label_LabelDefinition" (
"Id" uuid NOT NULL,
"Code" character varying(64) NOT NULL,
"Name" character varying(64) NULL,
"Description" character varying(1024) NULL,
"Type" character varying(64) NULL,
"Prefix" character varying(64) NULL,
"Format" character varying(64) NULL,
"SerialLength" integer NOT NULL,
"Separator" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_LabelDefinition" PRIMARY KEY ("Id")
);
CREATE TABLE "Label_PalletCode" (
"Id" uuid NOT NULL,
"RuleCode" character varying(64) NOT NULL,
"PalletlNumber" integer NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_PalletCode" PRIMARY KEY ("Id")
);
CREATE TABLE "Label_PalletLabel" (
"Id" uuid NOT NULL,
"Code" character varying(64) NOT NULL,
"LabelType" character varying(64) NOT NULL,
"LabelStatus" character varying(64) NOT NULL,
"HasItem" boolean NOT NULL,
"Name" text NULL,
"Desc1" text NULL,
"Desc2" text NULL,
"ParentId" uuid NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_PalletLabel" PRIMARY KEY ("Id")
);
CREATE TABLE "Label_SaleLabel" (
"Id" uuid NOT NULL,
"Code" character varying(64) NOT NULL,
"LabelType" character varying(64) NOT NULL,
"FullBarcodeString" character varying(64) NOT NULL,
"ItemCode" character varying(64) NOT NULL,
"ItemName" text NULL,
"ItemDesc1" text NULL,
"ItemDesc2" text NULL,
"Lot" character varying(64) NOT NULL,
"SupplierBatch" text NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"StdPackQty" numeric(18,6) NOT NULL,
"Uom" character varying(64) NULL,
"Qty" numeric(18,6) NOT NULL,
"LabelStatus" character varying(64) NOT NULL,
"DocumentCode" character varying(64) NOT NULL,
"ContainerCode" character varying(64) NOT NULL,
"SaleInfo_SaleInfoName" text NULL,
"QualityInfo_QLevel" character varying(64) NULL,
"QualityInfo_QualityFile" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_SaleLabel" PRIMARY KEY ("Id")
);
CREATE TABLE "Label_SerialCode" (
"Id" uuid NOT NULL,
"RuleCode" character varying(64) NOT NULL,
"SerialNumber" integer NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Label_SerialCode" PRIMARY KEY ("Id")
);
CREATE UNIQUE INDEX "IX_Label_CountLabel_RuleCode_CountNumber" ON "Label_CountLabel" ("RuleCode", "CountNumber");
CREATE UNIQUE INDEX "IX_Label_InventoryLabel_Code" ON "Label_InventoryLabel" ("Code");
CREATE UNIQUE INDEX "IX_Label_LabelDefinition_Code" ON "Label_LabelDefinition" ("Code");
CREATE UNIQUE INDEX "IX_Label_PalletCode_RuleCode_PalletlNumber" ON "Label_PalletCode" ("RuleCode", "PalletlNumber");
CREATE UNIQUE INDEX "IX_Label_PalletLabel_Code" ON "Label_PalletLabel" ("Code");
CREATE UNIQUE INDEX "IX_Label_SaleLabel_Code" ON "Label_SaleLabel" ("Code");
CREATE UNIQUE INDEX "IX_Label_SerialCode_RuleCode_SerialNumber" ON "Label_SerialCode" ("RuleCode", "SerialNumber");

145
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.MessageDbContext.sql

@ -0,0 +1,145 @@
CREATE TABLE "Message_Announcement" (
"Id" uuid NOT NULL,
"Title" character varying(64) NOT NULL,
"Brief" character varying(1024) NOT NULL,
"Content" character varying(3072) NULL,
"MessageLevel" character varying(64) NOT NULL,
"ActiveTime" timestamp without time zone NOT NULL,
"ExpireTime" timestamp without time zone NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Message_Announcement" PRIMARY KEY ("Id")
);
CREATE TABLE "Message_MessageType" (
"Id" uuid NOT NULL,
"MessageTypeCode" character varying(64) NULL,
"MessageTypeName" character varying(64) NULL,
"EmailTemplate" character varying(3072) NULL,
"SmsTemplate" character varying(1024) NULL,
"IsSendEmail" boolean NOT NULL,
"IsSendSms" boolean NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Message_MessageType" PRIMARY KEY ("Id")
);
CREATE TABLE "Message_MessageTypeSubscribe" (
"Id" uuid NOT NULL,
"UserId" uuid NOT NULL,
"Username" character varying(64) NULL,
"MessageTypeId" uuid NOT NULL,
"MessageTypeCode" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Message_MessageTypeSubscribe" PRIMARY KEY ("Id")
);
CREATE TABLE "Message_NotifyMessage" (
"Id" uuid NOT NULL,
"MessageType" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
"Title" character varying(64) NOT NULL,
"Content" text NULL,
"MessageLevel" character varying(64) NOT NULL,
"SendTime" timestamp without time zone NOT NULL,
CONSTRAINT "PK_Message_NotifyMessage" PRIMARY KEY ("Id")
);
CREATE TABLE "Message_PrivateMessage" (
"Id" uuid NOT NULL,
"FromUserId" uuid NOT NULL,
"ToUserId" uuid NOT NULL,
"FromUsername" character varying(64) NOT NULL,
"ToUsername" character varying(64) NOT NULL,
"HasRead" boolean NOT NULL,
"ReadTime" timestamp without time zone NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
"Title" character varying(64) NOT NULL,
"Content" text NULL,
"MessageLevel" character varying(64) NOT NULL,
"SendTime" timestamp without time zone NOT NULL,
CONSTRAINT "PK_Message_PrivateMessage" PRIMARY KEY ("Id")
);
CREATE TABLE "Message_UserNotifyMessage" (
"Id" uuid NOT NULL,
"UserId" uuid NOT NULL,
"Username" character varying(64) NULL,
"MessageId" uuid NOT NULL,
"Title" character varying(1024) NULL,
"HasRead" boolean NOT NULL,
"ReadTime" timestamp without time zone NULL,
"HasPush" boolean NOT NULL,
"PushTime" timestamp without time zone NULL,
"SmsHasSent" boolean NOT NULL,
"SmsSendTime" timestamp without time zone NULL,
"EmailHasSent" boolean NOT NULL,
"EmailSendTime" timestamp without time zone NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Message_UserNotifyMessage" PRIMARY KEY ("Id")
);
CREATE INDEX "IX_Message_Announcement_Title" ON "Message_Announcement" ("Title");
CREATE INDEX "IX_Message_MessageType_MessageTypeCode" ON "Message_MessageType" ("MessageTypeCode");
CREATE INDEX "IX_Message_MessageTypeSubscribe_UserId_MessageTypeId" ON "Message_MessageTypeSubscribe" ("UserId", "MessageTypeId");
CREATE INDEX "IX_Message_NotifyMessage_Title" ON "Message_NotifyMessage" ("Title");
CREATE INDEX "IX_Message_PrivateMessage_FromUserId_ToUserId_Title" ON "Message_PrivateMessage" ("FromUserId", "ToUserId", "Title");
CREATE INDEX "IX_Message_UserNotifyMessage_UserId_MessageId" ON "Message_UserNotifyMessage" ("UserId", "MessageId");

63
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.InventoryDbContext.sql

@ -38,8 +38,7 @@ CREATE TABLE [Inventory_Balance] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_Balance] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_Container] (
@ -64,8 +63,7 @@ CREATE TABLE [Inventory_Container] (
[Worker] nvarchar(max) NULL,
[Number] nvarchar(max) NULL,
CONSTRAINT [PK_Inventory_Container] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_ErpBalance] (
@ -85,8 +83,7 @@ CREATE TABLE [Inventory_ErpBalance] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_ErpBalance] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_ExpectIn] (
@ -121,8 +118,7 @@ CREATE TABLE [Inventory_ExpectIn] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_ExpectIn] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_ExpectOut] (
@ -157,8 +153,7 @@ CREATE TABLE [Inventory_ExpectOut] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_ExpectOut] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_LocationCapacity] (
@ -177,8 +172,7 @@ CREATE TABLE [Inventory_LocationCapacity] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_LocationCapacity] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_Snapshot] (
@ -215,8 +209,7 @@ CREATE TABLE [Inventory_Snapshot] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_Snapshot] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_Transaction] (
@ -260,8 +253,7 @@ CREATE TABLE [Inventory_Transaction] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_Transaction] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_TransferLog] (
@ -314,8 +306,7 @@ CREATE TABLE [Inventory_TransferLog] (
[TenantId] uniqueidentifier NULL,
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_TransferLog] PRIMARY KEY ([Id])
);
GO
)
CREATE TABLE [Inventory_ContainerDetail] (
@ -349,51 +340,39 @@ CREATE TABLE [Inventory_ContainerDetail] (
[Remark] nvarchar(3072) NULL,
CONSTRAINT [PK_Inventory_ContainerDetail] PRIMARY KEY ([Id]),
CONSTRAINT [FK_Inventory_ContainerDetail_Inventory_Container_MasterID] FOREIGN KEY ([MasterID]) REFERENCES [Inventory_Container] ([Id]) ON DELETE CASCADE
);
GO
)
CREATE UNIQUE INDEX [IX_Inventory_Balance_PackingCode_Status_LocationCode_ItemCode_Lot_ContainerCode] ON [Inventory_Balance] ([PackingCode], [Status], [LocationCode], [ItemCode], [Lot], [ContainerCode]) WHERE [ContainerCode] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_Inventory_Balance_PackingCode_Status_LocationCode_ItemCode_Lot_ContainerCode] ON [Inventory_Balance] ([PackingCode], [Status], [LocationCode], [ItemCode], [Lot], [ContainerCode]) WHERE [ContainerCode] IS NOT NULL
CREATE UNIQUE INDEX [IX_Inventory_Container_ContainerCode] ON [Inventory_Container] ([ContainerCode]);
GO
CREATE UNIQUE INDEX [IX_Inventory_Container_ContainerCode] ON [Inventory_Container] ([ContainerCode])
CREATE INDEX [IX_Inventory_ContainerDetail_MasterID] ON [Inventory_ContainerDetail] ([MasterID]);
GO
CREATE INDEX [IX_Inventory_ContainerDetail_MasterID] ON [Inventory_ContainerDetail] ([MasterID])
CREATE UNIQUE INDEX [IX_Inventory_ContainerDetail_PackingCode_Lot_ItemCode] ON [Inventory_ContainerDetail] ([PackingCode], [Lot], [ItemCode]);
GO
CREATE UNIQUE INDEX [IX_Inventory_ContainerDetail_PackingCode_Lot_ItemCode] ON [Inventory_ContainerDetail] ([PackingCode], [Lot], [ItemCode])
CREATE UNIQUE INDEX [IX_Inventory_ErpBalance_ItemCode_Lot_LocationCode_Status] ON [Inventory_ErpBalance] ([ItemCode], [Lot], [LocationCode], [Status]) WHERE [Lot] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_Inventory_ErpBalance_ItemCode_Lot_LocationCode_Status] ON [Inventory_ErpBalance] ([ItemCode], [Lot], [LocationCode], [Status]) WHERE [Lot] IS NOT NULL
CREATE UNIQUE INDEX [IX_Inventory_ExpectIn_PackingCode_LocationCode_ItemCode_JobNumber] ON [Inventory_ExpectIn] ([PackingCode], [LocationCode], [ItemCode], [JobNumber]);
GO
CREATE UNIQUE INDEX [IX_Inventory_ExpectIn_PackingCode_LocationCode_ItemCode_JobNumber] ON [Inventory_ExpectIn] ([PackingCode], [LocationCode], [ItemCode], [JobNumber])
CREATE UNIQUE INDEX [IX_Inventory_ExpectOut_PackingCode_Status_ItemCode_LocationCode_Lot_JobNumber] ON [Inventory_ExpectOut] ([PackingCode], [Status], [ItemCode], [LocationCode], [Lot], [JobNumber]) WHERE [Lot] IS NOT NULL;
GO
CREATE UNIQUE INDEX [IX_Inventory_ExpectOut_PackingCode_Status_ItemCode_LocationCode_Lot_JobNumber] ON [Inventory_ExpectOut] ([PackingCode], [Status], [ItemCode], [LocationCode], [Lot], [JobNumber]) WHERE [Lot] IS NOT NULL
CREATE UNIQUE INDEX [IX_Inventory_LocationCapacity_LocationCode] ON [Inventory_LocationCapacity] ([LocationCode]);
GO
CREATE UNIQUE INDEX [IX_Inventory_LocationCapacity_LocationCode] ON [Inventory_LocationCapacity] ([LocationCode])
CREATE UNIQUE INDEX [IX_Inventory_Snapshot_SnapshotDate_SnapshotTime_PackingCode] ON [Inventory_Snapshot] ([SnapshotDate], [SnapshotTime], [PackingCode]);
GO
CREATE UNIQUE INDEX [IX_Inventory_Snapshot_SnapshotDate_SnapshotTime_PackingCode] ON [Inventory_Snapshot] ([SnapshotDate], [SnapshotTime], [PackingCode])
CREATE UNIQUE INDEX [IX_Inventory_Transaction_TransNumber] ON [Inventory_Transaction] ([TransNumber]);
GO
CREATE UNIQUE INDEX [IX_Inventory_Transaction_TransNumber] ON [Inventory_Transaction] ([TransNumber])
CREATE UNIQUE INDEX [IX_Inventory_TransferLog_TransferNumber] ON [Inventory_TransferLog] ([TransferNumber]);
GO
CREATE UNIQUE INDEX [IX_Inventory_TransferLog_TransferNumber] ON [Inventory_TransferLog] ([TransferNumber])

1038
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql

File diff suppressed because it is too large

378
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.InventoryDbContext.sql

@ -0,0 +1,378 @@
CREATE TABLE "Inventory_Balance" (
"Id" uuid NOT NULL,
"PackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"Lot" character varying(64) NOT NULL,
"SerialNumber" character varying(64) NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"StdPackQty" numeric(18,6) NOT NULL,
"Status" character varying(64) NOT NULL,
"WarehouseCode" character varying(64) NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"LocationArea" character varying(64) NOT NULL,
"LocationGroup" character varying(64) NOT NULL,
"LocationErpCode" character varying(64) NOT NULL,
"PutInTime" timestamp without time zone NOT NULL,
"ContainerCode" character varying(64) NULL,
"LastCountTime" timestamp without time zone NOT NULL,
"LastCountPlanNumber" character varying(64) NULL,
"LastCountLabel" character varying(64) NULL,
"IsActive" boolean NOT NULL DEFAULT FALSE,
"ManageType" character varying(64) NOT NULL,
"LastTransType" character varying(64) NOT NULL,
"LastTransNumber" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_Balance" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_Container" (
"Id" uuid NOT NULL,
"ContainerCode" character varying(64) NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"Type" character varying(64) NULL,
"Capacity" numeric(18,6) NOT NULL,
"ProjectCode" text NULL,
"SeqNo" text NULL,
"BusinessStatus" character varying(64) NOT NULL,
"Status" character varying(64) NOT NULL,
"WarehouseCode" text NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
"Worker" text NULL,
"Number" text NULL,
CONSTRAINT "PK_Inventory_Container" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_ErpBalance" (
"Id" uuid NOT NULL,
"ItemCode" character varying(64) NOT NULL,
"Lot" character varying(64) NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"Status" text NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_ErpBalance" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_ExpectIn" (
"Id" uuid NOT NULL,
"PackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"Lot" character varying(64) NULL,
"SerialNumber" character varying(64) NULL,
"Status" character varying(64) NOT NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"JobNumber" character varying(64) NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"LocationArea" character varying(64) NOT NULL,
"LocationGroup" character varying(64) NOT NULL,
"LocationErpCode" character varying(64) NOT NULL,
"ContainerCode" character varying(64) NULL,
"WarehouseCode" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_ExpectIn" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_ExpectOut" (
"Id" uuid NOT NULL,
"PackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"Lot" character varying(64) NULL,
"SerialNumber" character varying(64) NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"Status" character varying(64) NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"LocationArea" character varying(64) NOT NULL,
"LocationGroup" character varying(64) NOT NULL,
"LocationErpCode" character varying(64) NOT NULL,
"JobNumber" character varying(64) NOT NULL,
"ContainerCode" character varying(64) NULL,
"WarehouseCode" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_ExpectOut" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_LocationCapacity" (
"Id" uuid NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"UsedCapacity" numeric(18,6) NOT NULL,
"AvailableCapacity" numeric(18,6) NOT NULL,
"BearableOverloadCapacity" numeric(18,6) NOT NULL,
"IsInfinity" boolean NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_LocationCapacity" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_Snapshot" (
"Id" uuid NOT NULL,
"SnapshotDate" timestamp without time zone NOT NULL,
"SnapshotTime" timestamp without time zone NOT NULL,
"PackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"Lot" character varying(64) NULL,
"SerialNumber" character varying(64) NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"Status" character varying(64) NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"LocationArea" character varying(64) NOT NULL,
"LocationGroup" character varying(64) NOT NULL,
"LocationErpCode" character varying(64) NOT NULL,
"PutInTime" timestamp without time zone NOT NULL,
"ContainerCode" character varying(64) NULL,
"WarehouseCode" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_Snapshot" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_Transaction" (
"Id" uuid NOT NULL,
"TransNumber" character varying(64) NOT NULL,
"TransType" character varying(64) NOT NULL,
"TransSubType" character varying(64) NOT NULL,
"TransInOut" character varying(64) NOT NULL,
"PackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"Lot" character varying(64) NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"StdPackQty" numeric(18,6) NOT NULL,
"Status" character varying(64) NOT NULL,
"WarehouseCode" character varying(64) NOT NULL,
"LocationCode" character varying(64) NOT NULL,
"LocationArea" character varying(64) NOT NULL,
"LocationGroup" character varying(64) NOT NULL,
"LocationErpCode" character varying(64) NOT NULL,
"ContainerCode" character varying(64) NULL,
"ActiveDate" timestamp without time zone NOT NULL,
"TransTime" timestamp without time zone NOT NULL,
"Worker" character varying(64) NULL,
"JobNumber" character varying(64) NULL,
"DocNumber" character varying(64) NULL,
"ManageType" character varying(64) NOT NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_Transaction" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_TransferLog" (
"Id" uuid NOT NULL,
"TransferNumber" character varying(64) NOT NULL,
"FromPackingCode" character varying(64) NOT NULL,
"ToPackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"StdPackQty" numeric(18,6) NOT NULL,
"FromTransNumber" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"FromLot" character varying(64) NULL,
"FromStatus" character varying(64) NOT NULL,
"FromWarehouseCode" character varying(64) NOT NULL,
"FromLocationCode" character varying(64) NOT NULL,
"FromLocationArea" character varying(64) NOT NULL,
"FromLocationGroup" character varying(64) NOT NULL,
"FromLocationErpCode" character varying(64) NOT NULL,
"FromContainerCode" character varying(64) NULL,
"ToTransNumber" character varying(64) NOT NULL,
"ToLot" character varying(64) NULL,
"ToStatus" character varying(64) NOT NULL,
"ToWarehouseCode" character varying(64) NOT NULL,
"ToLocationCode" character varying(64) NOT NULL,
"ToLocationArea" character varying(64) NOT NULL,
"ToLocationGroup" character varying(64) NOT NULL,
"ToLocationErpCode" character varying(64) NOT NULL,
"ToContainerCode" character varying(64) NULL,
"TransType" character varying(64) NOT NULL,
"TransSubType" character varying(64) NOT NULL,
"ActiveDate" timestamp without time zone NOT NULL,
"TransferTime" timestamp without time zone NOT NULL,
"Worker" character varying(64) NULL,
"JobNumber" character varying(64) NULL,
"DocNumber" character varying(64) NULL,
"ExtraProperties" text NULL,
"ConcurrencyStamp" character varying(40) NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"TenantId" uuid NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_TransferLog" PRIMARY KEY ("Id")
);
CREATE TABLE "Inventory_ContainerDetail" (
"Id" uuid NOT NULL,
"ContainerCode" character varying(64) NOT NULL,
"PackingCode" character varying(64) NOT NULL,
"ItemName" character varying(64) NULL,
"ItemDesc1" character varying(64) NULL,
"ItemDesc2" character varying(64) NULL,
"ItemCode" character varying(64) NOT NULL,
"SupplierBatch" character varying(64) NULL,
"ArriveDate" timestamp without time zone NOT NULL,
"ProduceDate" timestamp without time zone NOT NULL,
"ExpireDate" timestamp without time zone NOT NULL,
"Lot" character varying(64) NOT NULL,
"Uom" character varying(64) NOT NULL,
"Qty" numeric(18,6) NOT NULL,
"Status" character varying(64) NOT NULL,
"Year" text NULL,
"ProductNo" text NULL,
"ProjectCode" text NULL,
"Position" text NULL,
"SeqNo" text NULL,
"CreationTime" timestamp without time zone NOT NULL,
"CreatorId" uuid NULL,
"LastModificationTime" timestamp without time zone NULL,
"LastModifierId" uuid NULL,
"MasterID" uuid NOT NULL,
"TenantId" uuid NULL,
"Number" text NULL,
"Remark" character varying(3072) NULL,
CONSTRAINT "PK_Inventory_ContainerDetail" PRIMARY KEY ("Id"),
CONSTRAINT "FK_Inventory_ContainerDetail_Inventory_Container_MasterID" FOREIGN KEY ("MasterID") REFERENCES "Inventory_Container" ("Id") ON DELETE CASCADE
);
CREATE UNIQUE INDEX "IX_Inventory_Balance_PackingCode_Status_LocationCode_ItemCode_~" ON "Inventory_Balance" ("PackingCode", "Status", "LocationCode", "ItemCode", "Lot", "ContainerCode");
CREATE UNIQUE INDEX "IX_Inventory_Container_ContainerCode" ON "Inventory_Container" ("ContainerCode");
CREATE INDEX "IX_Inventory_ContainerDetail_MasterID" ON "Inventory_ContainerDetail" ("MasterID");
CREATE UNIQUE INDEX "IX_Inventory_ContainerDetail_PackingCode_Lot_ItemCode" ON "Inventory_ContainerDetail" ("PackingCode", "Lot", "ItemCode");
CREATE UNIQUE INDEX "IX_Inventory_ErpBalance_ItemCode_Lot_LocationCode_Status" ON "Inventory_ErpBalance" ("ItemCode", "Lot", "LocationCode", "Status");
CREATE UNIQUE INDEX "IX_Inventory_ExpectIn_PackingCode_LocationCode_ItemCode_JobNum~" ON "Inventory_ExpectIn" ("PackingCode", "LocationCode", "ItemCode", "JobNumber");
CREATE UNIQUE INDEX "IX_Inventory_ExpectOut_PackingCode_Status_ItemCode_LocationCod~" ON "Inventory_ExpectOut" ("PackingCode", "Status", "ItemCode", "LocationCode", "Lot", "JobNumber");
CREATE UNIQUE INDEX "IX_Inventory_LocationCapacity_LocationCode" ON "Inventory_LocationCapacity" ("LocationCode");
CREATE UNIQUE INDEX "IX_Inventory_Snapshot_SnapshotDate_SnapshotTime_PackingCode" ON "Inventory_Snapshot" ("SnapshotDate", "SnapshotTime", "PackingCode");
CREATE UNIQUE INDEX "IX_Inventory_Transaction_TransNumber" ON "Inventory_Transaction" ("TransNumber");
CREATE UNIQUE INDEX "IX_Inventory_TransferLog_TransferNumber" ON "Inventory_TransferLog" ("TransferNumber");

5691
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Npgsql.EntityFrameworkCore.PostgreSQL.StoreDbContext.sql

File diff suppressed because it is too large

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Customers/Inputs/CustomerImportInput.cs

@ -35,12 +35,14 @@ public class CustomerImportInput : SfsBaseDataImportInputBase
/// 类型
/// </summary>
[Display(Name = "类型")]
[Required(ErrorMessage = "类型是必填项")]
public EnumCustomerType Type { get; set; }
/// <summary>
/// 状态
/// </summary>
[Display(Name = "状态")]
[Required(ErrorMessage = "状态是必填项")]
public bool IsActive { get; set; }
/// <summary>

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/AQLs/AQLAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void AQLAutoMapperProfile()
{
CreateMap<AQL, AQLDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<AQLImportInput, AQL>()
.IgnoreAuditedObjectProperties()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Areas/AreaAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void AreaAutoMapperProfile()
{
CreateMap<Area, AreaDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<AreaImportInput, Area>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void BomAutoMapperProfile()
{
CreateMap<Bom, BomDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(t => t.ComponentDTOs)
.ForMember(x => x.ComponentQty, y => y.MapFrom(d => d.ComponentQty))
.ForMember(x => x.ComponentUom, y => y.MapFrom(d => d.ComponentUom))

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/CalendarAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CalendarAutoMapperProfile()
{
CreateMap<Calendar, CalendarDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<CalendarImportInput, Calendar>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Categories/CategoryAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CategoryAutoMapperProfile()
{
CreateMap<Category, CategoryDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<CategoryImportInput, Category>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CurrencyAutoMapperProfile()
{
CreateMap<Currency, CurrencyDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.Enabled)
.ReverseMap();
}

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyExchangeAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CurrencyExchangeAutoMapperProfile()
{
CreateMap<CurrencyExchange, CurrencyExchangeDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.CurrencyName)
.Ignore(x => x.BasicCurrencyName)
.Ignore(x => x.Enabled)

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerAddresses/CustomerAddressAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CustomerAddressAutoMapperProfile()
{
CreateMap<CustomerAddress, CustomerAddressDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<CustomerAddressImportInput, CustomerAddress>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CustomerItemAutoMapperProfile()
{
CreateMap<CustomerItem, CustomerItemDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<CustomerItemImportInput, CustomerItem>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Customers/CustomerAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CustomerAutoMapperProfile()
{
CreateMap<Customer, CustomerDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<CustomerImportInput, Customer>()

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs

@ -10,7 +10,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void DictAutoMapperProfile()
{
CreateMap<Dict, DictDTO>()
.IgnoreAuditedObjectProperties();
;
CreateMap<DictItem, DictItemDTO>()
.IgnoreAuditedObjectProperties();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Docks/DockAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void DockAutoMapperProfile()
{
CreateMap<Dock, DockDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<DockImportInput, Dock>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ErpLocationAutoMapperProfile()
{
CreateMap<ErpLocation, ErpLocationDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ErpLocationImportInput, ErpLocation>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemCategories/ItemCategoryAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemCategoryAutoMapperProfile()
{
CreateMap<ItemCategory, ItemCategoryDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ItemCategoryImportInput, ItemCategory>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemGuideBooks/ItemGuideBookAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemGuideBookAutoMapperProfile()
{
CreateMap<ItemGuideBook, ItemGuideBookDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2)
.ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemPackAutoMapperProfile()
{
CreateMap<ItemPack, ItemPackDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ItemPackImportInput, ItemPack>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemQualities/ItemQualityAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemQualityAutoMapperProfile()
{
CreateMap<ItemQuality, ItemQualityDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ItemQualityImportInput, ItemQuality>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemSafetyStocks/ItemSafetyStockAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemSafetyStockAutoMapperProfile()
{
CreateMap<ItemSafetyStock, ItemSafetyStockDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ItemSafetyStockImportInput, ItemSafetyStock>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemStoreRelationAutoMapperProfile()
{
CreateMap<ItemStoreRelation, ItemStoreRelationDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.LocationCode)
.ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAutoMapperProfile.cs

@ -11,7 +11,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
{
CreateMap<ItemBasic, ItemBasicDTO>()
.Ignore(x => x.ItemCategoryDictionary)
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ItemBasicImportInput, ItemBasic>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/LocationGroups/LocationGroupAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void LocationGroupAutoMapperProfile()
{
CreateMap<LocationGroup, LocationGroupDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<LocationGroupImportInput, LocationGroup>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Locations/LocationAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void LocationAutoMapperProfile()
{
CreateMap<Location, LocationDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<LocationImportInput, Location>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Machines/MachineAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void MachineAutoMapperProfile()
{
CreateMap<Machine, MachineDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ProdLineName)
.Ignore(x => x.WorkStationName)
.ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ProductionLineItemAutoMapperProfile()
{
CreateMap<ProductionLineItem, ProductionLineItemDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ProductionLineItemImportInput, ProductionLineItem>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ProductionLineAutoMapperProfile()
{
CreateMap<ProductionLine, ProductionLineDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ProductionLineImportInput, ProductionLine>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Projects/ProjectAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ProjectAutoMapperProfile()
{
CreateMap<Project, ProjectDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ProjectImportInput, Project>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void PurchasePriceSheetAutoMapperProfile()
{
CreateMap<PurchasePriceSheet, PurchasePriceSheetDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.SupplierName)
.Ignore(x => x.CurrencyName)
.ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SalePriceSheetAutoMapperProfile()
{
CreateMap<SalePriceSheet, SalePriceSheetDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.CustomerName)
.Ignore(x => x.CurrencyName)
.ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Shifts/ShiftAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ShiftAutoMapperProfile()
{
CreateMap<Shift, ShiftDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<ShiftImportInput, Shift>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/StdCostPrices/StdCostPriceSheetAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void StdCostPriceSheetAutoMapperProfile()
{
CreateMap<StdCostPriceSheet, StdCostPriceSheetDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.SupplierName)
.Ignore(x => x.CurrencyName)
.ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SupplierItemAutoMapperProfile()
{
CreateMap<SupplierItem, SupplierItemDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<SupplierItemImportInput, SupplierItem>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierTimeWindows/SupplierTimeWindowAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SupplierTimeWindowAutoMapperProfile()
{
CreateMap<SupplierTimeWindow, SupplierTimeWindowDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<SupplierTimeWindowImportInput, SupplierTimeWindow>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Suppliers/SupplierAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SupplierAutoMapperProfile()
{
CreateMap<Supplier, SupplierDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<SupplierImportInput, Supplier>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Teams/TeamAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void TeamAutoMapperProfile()
{
CreateMap<Team, TeamDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<TeamImportInput, Team>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/TransactionTypes/TransactionTypeAutoMapperProfile.cs

@ -13,7 +13,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void TransactionTypeAutoMapperProfile()
{
CreateMap<TransactionType, TransactionTypeDTO>()
.IgnoreAuditedObjectProperties()
.ForMember(x => x.InLocationTypes, y => y.MapFrom(d => d.InLocationTypes.GetEnumList<EnumLocationType>(",")))
.ForMember(x => x.OutLocationTypes, y => y.MapFrom(d => d.OutLocationTypes.GetEnumList<EnumLocationType>(",")))
.ForMember(x => x.InLocationAreas, y => y.MapFrom(d => d.InLocationAreas.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList()))

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Uoms/UomAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void UomAutoMapperProfile()
{
CreateMap<Uom, UomDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<UomImportInput, Uom>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Warehouses/WarehouseAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WarehouseAutoMapperProfile()
{
CreateMap<Warehouse, WarehouseDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
}
}

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkCenters/WorkCenterAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WorkStationAutoMapperProfile()
{
CreateMap<WorkStation, WorkStationDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
}
}

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkGroups/WorkGroupAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WorkGroupAutoMapperProfile()
{
CreateMap<WorkGroup, WorkGroupDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<WorkGroupImportInput, WorkGroup>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkShops/WorkShopAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WorkShopAutoMapperProfile()
{
CreateMap<WorkShop, WorkShopDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap();
CreateMap<WorkShopImportInput, WorkShop>()

3
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumCustomerType.cs

@ -10,4 +10,7 @@ public enum EnumCustomerType
[Display(Name = "空")]
None = 0,
[Display(Name = "普通用户")]
Normal = 1,
}

31
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs

@ -8,6 +8,9 @@ using System.Linq.Dynamic.Core;
using System.Reflection;
using AutoMapper.Internal;
using ClosedXML.Excel;
using ClosedXML.Graphics;
using DocumentFormat.OpenXml;
using Irony;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Win_in.Sfs.Shared.Application.Contracts;
@ -22,12 +25,18 @@ public class ClosedXmlExportImportService : IExportImportService
public FileContentResult Export<TModel>(List<TModel> list, bool includeAuditedProperties = false, string detailsProptyName = null)
{
using (var fallbackFontStream = Assembly.GetExecutingAssembly().GetManifestResourceStream($"{Assembly.GetExecutingAssembly().FullName}.Resources.calibril.ttf"))
{
LoadOptions.DefaultGraphicEngine = DefaultGraphicEngine.CreateWithFontsAndSystemFonts(fallbackFontStream);
}
try
{
using var workbook = new XLWorkbook();
var name = typeof(TModel).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(TModel).Name;
var fileName = $"{name}_导出.xlsx";
var ws = workbook.Worksheets.Add(name);
ws.Style.Font.FontName = "宋体";
//
var ignoreProperties = $"Id,TenantId,ExtraProperties,ConcurrencyStamp";
var defaultPropertyNames = new Dictionary<string, string>() {
@ -90,6 +99,15 @@ public class ClosedXmlExportImportService : IExportImportService
var validOptions = $"\"{string.Join(",", options)}\"";
cdv.List(validOptions, true);
}
if (propertyType.Name == typeof(bool).Name)
{
var cdv = ws.Column(i + 1).CreateDataValidation();
var options = new List<string> { "是","否"};
var validOptions = $"\"{string.Join(",", options)}\"";
cdv.List(validOptions, true);
}
SetCellStyle(cell, 1, i + 1, true, property.GetCustomAttributes<RequiredAttribute>().Any());
}
//
@ -143,6 +161,17 @@ public class ClosedXmlExportImportService : IExportImportService
.FirstOrDefault();
property.SetValue(model, enumValue);
}
else if(propertyType.Name== typeof(bool).Name)
{
if (value.GetText() == "是")
{
property.SetValue(model, true);
}
else
{
property.SetValue(model, false);
}
}
else
{
var propertyValue = Convert.ChangeType(value.ToString(), propertyType);
@ -269,6 +298,8 @@ public class ClosedXmlExportImportService : IExportImportService
cell.Style.Font.FontColor = fontColor ?? (isRequired ? XLColor.Red : XLColor.Black);
// font weight
cell.Style.Font.Bold = isHeader;
cell.Style.Font.FontName = "calibril";
//cell.Style.Font.FontName =
// background color
cell.Style.Fill.BackgroundColor = rowIndex % 2 == 0 ? XLColor.LightGray : XLColor.White;
cell.Style.Fill.BackgroundColor = columnIndex % 2 == 0 ? XLColor.White : XLColor.White;

73
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Properties/Resources.Designer.cs

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Win_in.Sfs.Shared.Application.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Win_in.Sfs.Shared.Application.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] calibril {
get {
object obj = ResourceManager.GetObject("calibril", resourceCulture);
return ((byte[])(obj));
}
}
}
}

124
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Properties/Resources.resx

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="calibril" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\calibril.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

BIN
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Resources/calibril.ttf

Binary file not shown.

25
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/Win_in.Sfs.Shared.Application.csproj

@ -16,6 +16,16 @@
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Remove="Resources\calibril.ttf" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\calibril.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.100.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
@ -32,4 +42,19 @@
<ProjectReference Include="..\Win_in.Sfs.Shared.Domain\Win_in.Sfs.Shared.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

73
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/HostBuilderExtensions.cs

@ -0,0 +1,73 @@
using System;
using System.Globalization;
using System.Net.Http;
using System.Reflection;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Volo.Abp.Modularity;
namespace Win_in.Sfs.Shared.Host;
public static class HostBuilderExtensions
{
public static int BuildAndRun<TModule>(this WebApplicationBuilder builder,
Action<WebApplicationBuilder> builderAction = null,
Action<WebApplication> appAction = null) where TModule : IAbpModule
{
Serilog.Debugging.SelfLog.Enable(Console.WriteLine);
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.Console(formatProvider: CultureInfo.InvariantCulture)
.CreateBootstrapLogger();
try
{
Log.Information($"Starting web host ${Assembly.GetEntryAssembly().GetName().Name}");
builder.Host.ConfigureAppConfiguration((hc, cb) =>
{
var defaultUrl = builder.Environment.IsDevelopment() ? "http://localhost:21093/" : "http://gateway/";
var configUrl = cb.Build().GetValue("", defaultUrl.TrimEnd('/'));
AddJsonByUrl(cb, $"{configUrl}/appsettings.json");
if (builder.Environment.IsDevelopment())
{
AddJsonByUrl(cb, $"{configUrl}/appsettings.{builder.Environment.EnvironmentName}.json");
}
});
builder.Host.UseAutofac();
builder.AddApplicationAsync<TModule>().Wait();
builder.Host.UseSerilog((hostingContext, services, configBuilder) =>
{
configBuilder
.ReadFrom.Configuration(hostingContext.Configuration)
.ReadFrom.Services(services)
.Enrich.FromLogContext()
.WriteTo.Console(formatProvider: CultureInfo.InvariantCulture);
}, writeToProviders: false);
builderAction?.Invoke(builder);
var app = builder.Build();
app.UseSerilogRequestLogging();
app.InitializeApplicationAsync().Wait();
appAction?.Invoke(app);
app.RunAsync().Wait();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
private static void AddJsonByUrl(IConfigurationBuilder configurationBuilder, string url)
{
var stream = new HttpClient().GetStreamAsync(url).Result;
configurationBuilder.AddJsonStream(stream);
}
}

67
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/IHostBuilderExtensions.cs

@ -1,67 +0,0 @@
using System;
using System.Globalization;
using System.Reflection;
using AgileConfig.Client;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Extensions.Hosting;
using Volo.Abp.Modularity;
namespace Win_in.Sfs.Shared.Host;
public static class IHostBuilderExtensions
{
public static int BuildAndRun<TModule>(this WebApplicationBuilder builder) where TModule : IAbpModule
{
Serilog.Debugging.SelfLog.Enable(Console.WriteLine);
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.Console(formatProvider: CultureInfo.InvariantCulture)
.CreateBootstrapLogger();
try
{
Log.Information($"Starting web host ${Assembly.GetEntryAssembly().GetName().Name}");
builder.Host
.UseAutofac()
.UseAgileConfig(o =>
{
var configClient = builder.Environment.EnvironmentName == "Development" ?
new ConfigClient($"appsettings.{builder.Environment.EnvironmentName}.json") :
new ConfigClient();
o.AppId = configClient.AppId;
o.Secret = configClient.Secret;
o.Nodes = configClient.ServerNodes;
o.ENV = configClient.Env;
});
builder.AddApplicationAsync<TModule>().Wait();
builder.Host.UseSerilog((hostingContext, services, configBuilder) =>
{
if (Log.Logger.GetType() == typeof(ReloadableLogger))
{
configBuilder
.ReadFrom.Configuration(hostingContext.Configuration)
.ReadFrom.Services(services)
.Enrich.FromLogContext()
.WriteTo.Console(formatProvider: CultureInfo.InvariantCulture);
}
}, writeToProviders: false);
var app = builder.Build();
app.UseSerilogRequestLogging();
app.InitializeApplicationAsync().Wait();
app.RunAsync().Wait();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}

10
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/ModuleBase.cs

@ -46,13 +46,19 @@ namespace Win_in.Sfs.Shared.Host;
public abstract class ModuleBase<T> : AbpModule where T : AbpModule
{
static ModuleBase()
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var cfg = context.Services.GetConfiguration();
ServiceConfigurationContext.SetConsoleTitleOfWebApp(Assembly.GetEntryAssembly().GetName().Name);
LimitedResultRequestDto.MaxMaxResultCount = 100000;
context.Services.AddAgileConfig();
//context.Services.AddAgileConfig();
PreConfigureServices(context);
ConfigureAntiForgery();
ConfigureLocalizationServices();
@ -162,11 +168,11 @@ public abstract class ModuleBase<T> : AbpModule where T : AbpModule
{
//dbContext.Database.BeginTransaction();
dbContext.Database.ExecuteSqlRaw(sql);
dbContext.Database.ExecuteSqlRaw($"INSERT INTO EFDbContext VALUES ('{contextName}', '{md5}');");
context.ServiceProvider
.GetRequiredService<IDataSeeder>()
.SeedAsync()
.Wait();
dbContext.Database.ExecuteSqlRaw($"INSERT INTO EFDbContext VALUES ('{contextName}', '{md5}');");
//dbContext.Database.CommitTransaction();
Console.WriteLine($"{contextName} 初始化成功");
}

73
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/Properties/Resources.Designer.cs

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Win_in.Sfs.Shared.Host.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Win_in.Sfs.Shared.Host.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
public static byte[] calibril {
get {
object obj = ResourceManager.GetObject("calibril", resourceCulture);
return ((byte[])(obj));
}
}
}
}

124
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/Properties/Resources.resx

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="calibril" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\calibril.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

BIN
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/Resources/calibril.ttf

Binary file not shown.

BIN
be/Modules/Shared/src/Win_in.Sfs.Shared.Host/calibril.ttf

Binary file not shown.

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/IssueNotePermissions.cs

@ -14,6 +14,9 @@ public static class IssueNotePermissions
//自动发料记录
public const string AutoIssueNote = StorePermissions.GroupName + "." + nameof(AutoIssueNote);
//直接发料
public const string DirectIssueNote = StorePermissions.GroupName + "." + nameof(DirectIssueNote);
public static void AddIssueNotePermission(this PermissionGroupDefinition permissionGroup)
{
var issueNotePermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(IssueNote)));
@ -22,5 +25,6 @@ public static class IssueNotePermissions
issueNotePermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr));
permissionGroup.AddPermission(AutoIssueNote, StorePermissionDefinitionProvider.L(nameof(AutoIssueNote)));
permissionGroup.AddPermission(DirectIssueNote, StorePermissionDefinitionProvider.L(nameof(DirectIssueNote)));
}
}

22
be/WZC2.sln

@ -29,12 +29,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Wms.DataExchange
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Wms.DataExchange.Iac.MesAgent", "DataExchange\src\Win_in.Sfs.Wms.DataExchange.MesAgent\Win_in.Sfs.Wms.DataExchange.Iac.MesAgent.csproj", "{6BA9342A-D26E-4C98-A02C-6780C0CC859A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gateways", "Gateways", "{E18F5C94-7D85-45E3-806B-A0975433788B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InternalGateway.Host", "Gateways\InternalGateway\InternalGateway.Host\InternalGateway.Host.csproj", "{DDB8F68F-2D2B-46B6-A6BD-42488B3D4243}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAppGateway.Host", "Gateways\WebAppGateway\WebAppGateway.Host\WebAppGateway.Host.csproj", "{71862380-449F-48C7-850B-EADE103F14E3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosts", "Hosts", "{F17D371C-DF73-4CD7-8BE1-3254110FB20B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Auth", "Auth", "{A9DCA976-396C-487F-BCF1-70F5C5ACA2F9}"
@ -257,15 +251,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Wms.DataExchange
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Wms.Dashboard.Host", "Hosts\Win_in.Sfs.Wms.Dashboard.Host\Win_in.Sfs.Wms.Dashboard.Host.csproj", "{637A1F71-B29E-4247-B1C6-695790CE0525}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{AA2EB21B-5FE7-4C83-81FA-AC57CC9BE3F8}"
ProjectSection(SolutionItems) = preProject
Output\Config\CommonSettings.json = Output\Config\CommonSettings.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Shared.Host", "Modules\Shared\src\Win_in.Sfs.Shared.Host\Win_in.Sfs.Shared.Host.csproj", "{EBC2FEC4-BCCC-4430-953B-2712C0416BC6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1D67CBA8-80A6-4A91-B816-9D35B2DD94F8}"
ProjectSection(SolutionItems) = preProject
..\build\src\docker\publish\.env = ..\build\src\docker\publish\.env
..\build\src\docker\publish\settings\appsettings.Development.json = ..\build\src\docker\publish\settings\appsettings.Development.json
..\build\src\docker\publish\settings\appsettings.json = ..\build\src\docker\publish\settings\appsettings.json
EndProjectSection
@ -322,14 +312,6 @@ Global
{6BA9342A-D26E-4C98-A02C-6780C0CC859A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BA9342A-D26E-4C98-A02C-6780C0CC859A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BA9342A-D26E-4C98-A02C-6780C0CC859A}.Release|Any CPU.Build.0 = Release|Any CPU
{DDB8F68F-2D2B-46B6-A6BD-42488B3D4243}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDB8F68F-2D2B-46B6-A6BD-42488B3D4243}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDB8F68F-2D2B-46B6-A6BD-42488B3D4243}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDB8F68F-2D2B-46B6-A6BD-42488B3D4243}.Release|Any CPU.Build.0 = Release|Any CPU
{71862380-449F-48C7-850B-EADE103F14E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71862380-449F-48C7-850B-EADE103F14E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71862380-449F-48C7-850B-EADE103F14E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71862380-449F-48C7-850B-EADE103F14E3}.Release|Any CPU.Build.0 = Release|Any CPU
{B06007E2-6B77-43E9-A20A-D0AB60E33BE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B06007E2-6B77-43E9-A20A-D0AB60E33BE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B06007E2-6B77-43E9-A20A-D0AB60E33BE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -684,8 +666,6 @@ Global
{C1C2B439-A555-4852-8E59-DBE0D7AD8F17} = {6EA46447-F3C7-4F33-B04E-2BA3567338DD}
{B21E726F-1B9E-48BD-B8D4-7B540105ED22} = {6EA46447-F3C7-4F33-B04E-2BA3567338DD}
{6BA9342A-D26E-4C98-A02C-6780C0CC859A} = {820295E6-920E-4DD0-85FC-6B3D83C2158D}
{DDB8F68F-2D2B-46B6-A6BD-42488B3D4243} = {E18F5C94-7D85-45E3-806B-A0975433788B}
{71862380-449F-48C7-850B-EADE103F14E3} = {E18F5C94-7D85-45E3-806B-A0975433788B}
{A9DCA976-396C-487F-BCF1-70F5C5ACA2F9} = {19170DC9-37E2-416A-AABC-F543C1B4A701}
{9802A799-8064-406D-8629-80C622A1BE46} = {A9DCA976-396C-487F-BCF1-70F5C5ACA2F9}
{B06007E2-6B77-43E9-A20A-D0AB60E33BE8} = {9802A799-8064-406D-8629-80C622A1BE46}

2
build/src/docker/publish/.env

@ -3,6 +3,7 @@ PORTAINER_CE_VERSION=linux-amd64
SQLSERVER_VERSION=2022-latest
SEQ_VERSION=2022.1
MYSQL_VERSION=8.0.31
POSTGRES_VERSION=15.2
REDIS_VERSION=7.0.7
TRAEFIK_VERSION=v2.9.6
CADDY_VERSION=2.6.4
@ -42,3 +43,4 @@ NGINX_PORT3=21382
# Config
MYSQL_ROOT_PASSWORD=aA123456!
MSSQL_SA_PASSWORD=aA123456!

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

Loading…
Cancel
Save