34 changed files with 8558 additions and 867 deletions
@ -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> |
|
@ -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"; |
|
||||
}); |
|
||||
} |
|
||||
} |
|
@ -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>(); |
|
||||
} |
|
||||
} |
|
@ -1,12 +0,0 @@ |
|||||
{ |
|
||||
"profiles": { |
|
||||
"InternalGateway.Host": { |
|
||||
"commandName": "Project", |
|
||||
"launchBrowser": true, |
|
||||
"environmentVariables": { |
|
||||
"ASPNETCORE_ENVIRONMENT": "Development" |
|
||||
}, |
|
||||
"applicationUrl": "http://localhost:10020" |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,9 +0,0 @@ |
|||||
{ |
|
||||
"Logging": { |
|
||||
"LogLevel": { |
|
||||
"Default": "Information", |
|
||||
"Microsoft": "Warning", |
|
||||
"Microsoft.Hosting.Lifetime": "Information" |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -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": "*" |
|
||||
} |
|
@ -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" ] |
|
||||
} |
|
||||
|
|
||||
] |
|
||||
} |
|
@ -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 |
|
@ -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"] |
|
@ -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>(); |
|
||||
} |
|
||||
} |
|
@ -1,17 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<!-- |
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121. |
|
||||
--> |
|
||||
<Project> |
|
||||
<PropertyGroup> |
|
||||
<DeleteExistingFiles>true</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> |
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod> |
|
||||
<_TargetId>Folder</_TargetId> |
|
||||
</PropertyGroup> |
|
||||
</Project> |
|
@ -1,12 +0,0 @@ |
|||||
{ |
|
||||
"profiles": { |
|
||||
"WebAppGateway.Host": { |
|
||||
"commandName": "Project", |
|
||||
"launchBrowser": true, |
|
||||
"environmentVariables": { |
|
||||
"ASPNETCORE_ENVIRONMENT": "Development" |
|
||||
}, |
|
||||
"applicationUrl": "http://localhost:59099" |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -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> |
|
@ -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(); |
|
||||
}); |
|
||||
}); |
|
||||
} |
|
||||
} |
|
@ -1,3 +0,0 @@ |
|||||
{ |
|
||||
"Urls": "http://localhost:59099" |
|
||||
} |
|
@ -1,4 +0,0 @@ |
|||||
//{应用地址} -----应 用 地 址 |
|
||||
{ |
|
||||
"Urls": "http://{应用地址}:59099" |
|
||||
} |
|
@ -1,4 +0,0 @@ |
|||||
{ |
|
||||
|
|
||||
|
|
||||
} |
|
@ -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" ] |
|
||||
} |
|
||||
] |
|
||||
} |
|
@ -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 |
|
@ -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"); |
||||
|
|
||||
|
|
File diff suppressed because it is too large
@ -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"); |
||||
|
|
||||
|
|
@ -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"); |
||||
|
|
||||
|
|
@ -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"); |
||||
|
|
||||
|
|
@ -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"); |
||||
|
|
||||
|
|
File diff suppressed because it is too large
Loading…
Reference in new issue